So, if I have a string x, and x.length returns the count of characters in it,
how do I turn the return of string.length into an int?
I looked for duplicate questions but I don't think there are.
Thanks
So, if I have a string x, and x.length returns the count of characters in it,
how do I turn the return of string.length into an int?
I looked for duplicate questions but I don't think there are.
Thanks
 
    
    Just cast it to an int....
  int(x.length())
 
    
    The cast has already pointed out. Now, let me advise against using it, at least as a rule.
There's a reason it returns an unsigned integer type (among other things, because it might overflow what a signed integer can hold). You normally want to keep it as an unsigned type instead of converting it to int. 
