View Single Post
Old 11-15-2012, 07:32 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,662
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
I wouldn't suggest doing that. If you do, you will need to manually separate the built string from the stringbuilder (the space in particular) to break the first and last name apart. So what you would do is pull the indexOf the space, and then issue a delete giving it the location of the space index (from indexOf) followed by the length of the entire string builder.

Or you can just keep it in two array indexes instead. A String[2] is sufficient for the size required for first and last name. I don't see a reason to use a string builder here if there is intent to change one of the strings.
Fou-Lu is offline   Reply With Quote