contents   index   previous   next



String slice()

syntax:

string.slice(start[, end])

where:

start - index from which to start.

 

end - index at which to end.

 

return:

string - a substring (not a String object) consisting of the characters.

 

see:

String substring()

 

description:

This method is very similar to String substring(), in that it returns a substring from one index to another. The only difference is that if either start or end is negative, then it is treated as length + start or length + end. If either exceeds the bounds of the string, then either 0 or the length of the string is used instead.

 

 


String split()