Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

string slice


a="grayorphanvillain"
t=a[0:-13:1]
print(t,'/',end=" ")
k=a[-13:-7:1]
print(k,'/',end=" ")
m=a[-7:]
print(m,end=" ")
#output:
gray / orphan / villain 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #string #slice
ADD COMMENT
Topic
Name
6+4 =