From WikiChip
$str Identifier - mIRC
< mirc‎ | identifiers
Revision as of 18:30, 19 June 2017 by Maroonbells (talk | contribs) (Created content for empty page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The $str identifier duplicates the specified text string

Synopsis

$str( <text> , <N> )

Parameters

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

//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

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)