strrepeat(X;N)
Return the given string repeated a certain number of times.
Syntax
strrepeat(X;N)
bstrrepeat(X;N)
Input
| Argument | Type | Description |
|---|---|---|
X |
text | The string to repeat A scalar value or the name of a column |
N |
integer | The number of times to repeat XA scalar value or the name of a column |
Return Value
Returns the text value corresponding to the string X concatenated together
N times.
If N<1, the result is the empty string (N/A).
If X or N is N/A, then the result is N/A.
Sample Usage
value |
times |
strrepeat(value;times) |
|---|---|---|
| '0' | 5 | '00000' |
| 'hee' | 2 | 'heehee' |
| 'hee' | -5 | '' |
Additional Information
strrepeatis Unicode (UTF-8) compliant and will work with Unicode or plain ASCII text fields.- If passed a string argument that is not legal Unicode, it will by default signal an error (configurable as a user preference).
- A corresponding function
bstrrepeatcan be used with non-Unicode strings (e.g., binary or legacy encodings).
