Search results
Results from the WOW.Com Content Network
This template is used on 206,000+ pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage.
For example, rather than taking the final six characters of a string and checking if they are equal to "navbox", use {{str endswith|string|navbox}}.
Main page; Contents; Current events; Random article; About Wikipedia; Contact us
{{#invoke:String|endswith|source_str|search_string}} OR {{#invoke:String|endswith|source= source_string |pattern= search_string}} Returns "yes" if the source string ends with the search string. Use named parameters to have the strings trimmed before use. Despite the parameter name, search_string is not a Lua pattern, it is interpreted literally.
{{#invoke:String|endswith|source_str|search_string}} OR {{#invoke:String|endswith|source= source_string |pattern= search_string}} Returns "yes" if the source string ends with the search string. Use named parameters to have the strings trimmed before use. Despite the parameter name, search_string is not a Lua pattern, it is interpreted literally.
The title function capitalises the first letter of each word in the text, apart from a number of short words listed in The U.S. Government Printing Office Style Manual §3.49 "Center and side heads": a, an, the, at, by, for, in, of, on, to, up, and, as, but, or, and nor.
PHP generally follows C syntax, with exceptions and enhancements for its main use in web development, which makes heavy use of string manipulation. PHP variables must be prefixed by " $ ". This allows PHP to perform string interpolation in double quoted strings, where backslash is supported as an escape character .
This template removes the first word of the first parameter. Use |1= for the first parameter if the string may contain an equals sign (=). By default, words are delimited by spaces, but the optional parameter |sep= can set the separator to any character.