Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Search
Editing
Template:Str sub/doc
From MEpedia, a crowd-sourced encyclopedia of ME and CFS science and history
Namespaces
Template
Discussion
More
More
Page actions
Read
Edit source
History
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!
==Purpose== Extract the left characters of a string, starting part way through the string. ==Usage == {{TemplateBox |1label=1|1d= text string|1stat=Required|1example=Random string... |2label=2|2d= start position|2stat=Required|2example=2| |3label=3|3d= length (number of characters)|3example=3}} *<code><nowiki>{{Str sub|Level-headed|6|4}}</nowiki></code> :{{Str sub|Level-headed|6|4}} ==Example == *<code><nowiki>{{Str sub|Level-headed|6|4}}:</nowiki></code> :{{Str sub|Level-headed|6|4}} *Current 2 digit month: <code><nowiki>{{Str sub|{{CURRENTTIMESTAMP}}|4|2}}:</nowiki></code> :{{Str sub|{{CURRENTTIMESTAMP}}|4|2}} *<code><nowiki>{{Str sub|2014-03|5|2}}</nowiki></code>: :{{Str sub|2014-03|5|2}} *Combined with {{t1|Str left}} to alter a date: <code><nowiki>{{Str sub|2014-03|5|2}}-{{Str left|2014-03|4}}</nowiki></code> :{{Str sub|2014-03|5|2}}-{{Str left|2014-03|4}} ==See also == *{{t1|Str left}} Left characters only *{{t1|Str find}} *{{t1|Right}} right align text *[[:Category:String manipulation templates|String manipulation templates]] (category) *[[:Category:Date and time templates|Date and time templates]] (category) *[[:Category:Formatting templates|Formatting templates]] (category)
Summary:
Please make sure your edits are consistent with
MEpedia's guidelines
.
By saving changes, you agree to the
Terms of use
, and you irrevocably agree to release your contribution under the
CC BY-SA 3.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Str left
(
edit
)
Template:Str sub
(
edit
)
Template:T1
(
edit
)
Template:TemplateBox
(
edit
)
Module:String
(
edit
)
Navigation
Navigation
Skip to content
Main page
Browse
Become an editor
Random page
Popular pages
Abbreviations
Glossary
About MEpedia
Links for editors
Contents
Guidelines
Recent changes
Pages in need
Search
Help
Wiki tools
Wiki tools
Special pages
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs