File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dynamic arrays

 
Thomas Whalen
Ranch Hand
Posts: 123
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do i create an array dynamically? i have seen examples of where ArrayB was a copy of ArrayA, but this isn't what I want to do. i want to take a string and create an array that will hold just that string.
thank you,
thomas
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thomas,
Have you seen the API for the String class?

You can use the
void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
method which copies characters from this string into the destination character array.


 
Thomas Whalen
Ranch Hand
Posts: 123
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the example, i didn't even know to look in that API
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic