Hello, if I have a string for example "hello this is an example" it can be anything, how do I divide the string from the first space, that is, how do I get "this is an example" I tried split(" ")[1]
but I get "this"
Hello, if I have a string for example "hello this is an example" it can be anything, how do I divide the string from the first space, that is, how do I get "this is an example" I tried split(" ")[1]
but I get "this"
Returning to what was mentioned in the comments, here is a brief example of how to use it.
The
+ 1
is to skip white space at the beginning of the string.Another unorthodox alternative is to apply a split and go through the array concatenating each of the items, ignoring the first element of the array: