Loading...
Processing Forum
Recent Topics
All Forums
Move this topic
Forum :
Share your Work
Programming Questions
Core Library Questions
Contributed Library Questions
Android Processing
Processing with Other Languages
Integration and Hardware
Library and Tool Development
Events and Opportunities
General Discussion
Sub forum :
Move this topic
Cancel
General Discussion
Other
nathanlin..
Urgent - Interger Array to String
in
General Discussion
•
Other
•
1 year ago
I need some help. I have a ten by ten integer array array and I need to put it into a String to save it as a seperate text file. How would I do this?
1
Replies(3)
calsign
Re: Urgent - Interger Array to String
1 year ago
If you don't need to format the data in any particular way, you can loop through the first array, then use
str()
to convert the data to a
String
array, then combine the data, then save it with
saveStrings()
.
Leave a comment on calsign's reply
nathanlin..
Re: Urgent - Interger Array to String
1 year ago
How would I combine the data? Could you give me an example..?
Leave a comment on nathanlink169's reply
calsign
Re: Urgent - Interger Array to String
1 year ago
Loop through it, then concatenate it to a new array...
NOTE: An often confusing subject; a two-dimensional array is just an array of arrays, so it can be looped through like a normal array.
Like this (untested...):
String[][] inputArrays;
String[] outputArray;
for(int i = 0; i < inputArrays.length; i ++) {
outputArray = concat(outputArray, inputArrays[i]);
}
Leave a comment on calsign's reply
Change topic type
Topic Type :
Discussions
Questions
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to nathanlink169's question
Top
Reply
{"z19582621":[25080000001656240,25080000001656247],"z5123726":[25080000001655771,25080000001655775]}
Statistics
3
Replies
666
Views
1
Followers
Tags
Cancel
integer array array
string
Actions
Permalink
Related Posts
check if string is in a file
Simple String Manipulation Question
Processing serial servo communicati...
Dynamic Wordookie ( aka Dynamically...
loadString