andycharger Posted December 11, 2003 Posted December 11, 2003 I need to trim a variable in .net before I pass it to my sql statement as it is passing a load of whitespace at the end of my sentence. i.e. "My question is this...... " should become "My question is this......" So i need to trim the whitespace from the right hand side. Can anyone tell me how I trim to the right? Quote
Administrators PlausiblyDamp Posted December 11, 2003 Administrators Posted December 11, 2003 stringVar = stringVar.TrimEnd() Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
andycharger Posted December 11, 2003 Author Posted December 11, 2003 Will this remove the whitespace for me from the string or do I need something else in it? Quote
andycharger Posted December 11, 2003 Author Posted December 11, 2003 Cheers PLausibly, It works a treat! (as always!!!) 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.