Editing
Module:String/doc
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Usage === <pre> {{#invoke: String|sub|''target_string''|''start_index''|''end_index''}} </pre> OR <pre> {{#invoke: String|sub|s= ''target_string'' |i= ''start_index'' |j= ''end_index'' }} </pre> ; s : The string to return a subset of. ; i ''(optional)'' : The first index of the substring to return, defaults to 1. ; j ''(optional)'' : The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either '''i''' or '''j''' is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of '''-1''' is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported.
Summary:
Please note that all contributions to 2d4chan may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
2d4chan:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Module
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information