microkarl Posted June 6, 2005 Posted June 6, 2005 Hi again, I have this string: strA="40.99", I want to get rid of ".", so I did this strB = strA.Trim("."), but strB still has "40.99". Why is that? Quote Donald DUCK : YOU ARE FIRED!!!
mskeel Posted June 6, 2005 Posted June 6, 2005 Trim trims characters on either the beginning or end of a string. It didn't find a '.' in either the starting or ending character so it didn't trim anything off of the string. TrystrB = strA.Replace(".", "") That should replace the '.' character with a null character. Be careful, though, as this will replace all occurances of the '.' character. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.