From WikiChip
Difference between revisions of "mirc/identifiers/$str"
Maroonbells (talk | contribs) (Created content for empty page) |
m |
||
Line 1: | Line 1: | ||
− | {{mirc title|$str | + | {{mirc title|$str identifier}}'''$str''' duplicates the specified text string n times. |
− | + | ||
== Synopsis == | == Synopsis == | ||
− | <pre>$str( <text> , <N> )</pre> | + | <pre>$str(<text>,<N>)</pre> |
== Parameters == | == Parameters == | ||
Line 12: | Line 12: | ||
== Example == | == Example == | ||
− | + | <source lang="mIRC"> | |
− | < | + | //echo -a $str(Yes,3) |
− | //echo -a $str(Yes ,3) | ||
; returns: YesYesYes | ; returns: YesYesYes | ||
//echo -a $str(Yes $+ $chr(32) ,3) | //echo -a $str(Yes $+ $chr(32) ,3) | ||
; returns: Yes Yes Yes | ; returns: Yes Yes Yes | ||
− | </ | + | </source> |
Identifier makes it easier to replicate long strings, or strings of variable lengths. | Identifier makes it easier to replicate long strings, or strings of variable lengths. | ||
Line 35: | Line 34: | ||
== Compatibility == | == Compatibility == | ||
{{mIRC compatibility|4.5}} | {{mIRC compatibility|4.5}} | ||
− | Note: Version 5.0 changed syntax from $str(N,text) | + | '''Note:''' Version 5.0 changed syntax from $str(N,text) |
+ | |||
+ | {{mIRC identifier list}} | ||
− | [[Category: | + | [[Category:mIRC identifiers|str]] |
Latest revision as of 14:55, 22 September 2017
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$str duplicates the specified text string n times.
Contents
Synopsis[edit]
$str(<text>,<N>)
Parameters[edit]
TextThe text string that is being replicated.
NInteger 1+ is the number of times Text is replicated.
Returns $null if N is $null or is not greater than or equal to 1.
Example[edit]
//echo -a $str(Yes,3) ; returns: YesYesYes //echo -a $str(Yes $+ $chr(32) ,3) ; returns: Yes Yes Yes
Identifier makes it easier to replicate long strings, or strings of variable lengths.
//echo -a $str(=+ ,39) $+ = //echo -a %Title //echo -a $str($chr(45),$len(%Title))
; Initialize a 20-token comma-separated array //set %values $str(0 $+ $chr(44),19) $+ 0
Compatibility[edit]
Added: mIRC v4.5
Added on: 30 Jun 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
Note: Version 5.0 changed syntax from $str(N,text)
mIRC identifier list