Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
hassan

String To Array And Array To String

Recommended Posts

Hi

 

on page 65 it mentions hows strings can be converted to arrays and arrays into strings.

 

When would one use that in a real world programming situation?

 

Thanks in advance :-) 

Share this post


Link to post
Share on other sites

If I recall correctly, the book has an example that's rather practical. It's more convenient to have users enter lots of values as strings, and then you can easily convert them to arrays, which are more usable. Another example would be reading in a file as one long string, and then breaking the file on newlines/returns to create an array. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...