string (replace)-newbie
-
Hi again guys i have this simple question i have a string that holds some text string text; i want to search the string and replace any ("&nbs" with a space) if i use the string.replace("&nbs"," ") it doesn't work what else do i need to specify for the function to work? Any other ways to do it? Thanks a lot
-
Hi again guys i have this simple question i have a string that holds some text string text; i want to search the string and replace any ("&nbs" with a space) if i use the string.replace("&nbs"," ") it doesn't work what else do i need to specify for the function to work? Any other ways to do it? Thanks a lot
something like this: find the first "&nbs" copy the left part of the string (ie. before the &nbs) to a temp string add a " " to the temp in a loop: find the next "&nbs" in the remaining (right side) string if none found, add the remaing string to temp, and return temp add the left part to the temp add a " " to the temp repeat the loop Cleek | Image Toolkits | Thumbnail maker
-
something like this: find the first "&nbs" copy the left part of the string (ie. before the &nbs) to a temp string add a " " to the temp in a loop: find the next "&nbs" in the remaining (right side) string if none found, add the remaing string to temp, and return temp add the left part to the temp add a " " to the temp repeat the loop Cleek | Image Toolkits | Thumbnail maker
-
Hi again guys i have this simple question i have a string that holds some text string text; i want to search the string and replace any ("&nbs" with a space) if i use the string.replace("&nbs"," ") it doesn't work what else do i need to specify for the function to work? Any other ways to do it? Thanks a lot
antonaras wrote:
if i use the string.replace("&nbs"," ") it doesn't work
What dosn't work? Does the compiler/linker complain? Is an exception thrown? Do any replacements happen?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb