I have a line that typically starts with a few spaces as the lines are in columns and use a monospace font to make things line up. I want to check if the first non-white space character (or even just the first thing that isn’t a space) and see if that is a number. What is the least server intensive way of doing this?
Share
You can use
trim()(orltrim()in this case) to delete the whitespace, and make use of the array access of strings: