I am using the String split method and I want to have the last element. The size of the Array can change.
Example:
String one = \"Dü
String str = "www.anywebsite.com/folder/subfolder/directory"; int index = str.lastIndexOf('/'); String lastString = str.substring(index +1);
Now lastString has the value "directory"
lastString
"directory"