Malfunction Posted February 27, 2004 Posted February 27, 2004 Another simple one from the noob :rolleyes: : How do I check for an empty (only whitespace) string in a textbox? Not something like "if (tb.Text.equals(""))" :D Plus how do I cut off leading whitespace? Something like chop or chomp would of course od the trick for that first question. Quote Debug me...
Administrators PlausiblyDamp Posted February 27, 2004 Administrators Posted February 27, 2004 textbox1.text.trimstart would remove leading whitespace Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Malfunction Posted February 27, 2004 Author Posted February 27, 2004 thx I knew I would feel pretty dumb soon after posting my problem :) There's Trim(), TrimStart() and TrimEnd() in the String class. Quote Debug me...
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.