I am looking for a function that will return true / false if the string in question is complied of any number of spaces. The common method of doing this is if (string == " ") but this only works for one space. I need a function that would resolve any number of spaces to a return statement.
example
if (string == " ")
if (string == " ")
if (string == " ")
if (string == " ")
if (string == " ")
What is the best way to do this?
string = " J "