Template:Str left long/doc: Difference between revisions

Jump to navigation Jump to search
clean up
m (1 revision)
 
(clean up)
 
Line 3: Line 3:
<!-- Categories and interwikis go at the bottom of this page. -->
<!-- Categories and interwikis go at the bottom of this page. -->


The '''[[Template:Str_left_long]]''' is a general utility, as a string-handling utility template, to extract the left-hand side of long [[text string]]s beyond 500 to thousands of characters long, using a [[Lua script]] module.
The '''[[Template:Str left long]]''' is a general utility, as a string-handling utility template, to extract the left-hand side of long [[text string]]s beyond 500 to thousands of characters long, using a [[Lua script]] module.
__NOTOC__
__NOTOC__
== Usage ==
== Usage ==
Line 17: Line 17:


== Performance considerations ==
== Performance considerations ==
Because {str_left_long} uses a Lua module, it depends on the speed of the [[Lua script]] processing, which in February 2013, ran at the speed of 180 per second for repeated uses of {str_left_long}. By comparison, the [[wp:parser function]] {padleft:} runs at over 1,250 per second, to extract the left-hand side of a string, but only up to 500 long.
Because {str_left_long} uses a Lua module, it depends on the speed of the [[Lua script]] processing, which in February 2013, ran at the speed of 180 per second for repeated uses of {str_left_long}. By comparison, the [[SV:parser function]] {padleft:} runs at over 1,250 per second, to extract the left-hand side of a string, but only up to 500 long.


== See also ==
== See also ==
* [[Template:Str_left]] - extracts from short strings 1-500 long, 5x times faster
* [[Template:Str left]] - extracts from short strings 1-500 long, 5x times faster


<includeonly>
<includeonly>
14,061

edits

Navigation menu