DataBasic Reference > Statements and Intrinsic Functions > S > STRS Function

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

RealityV15.1Online Documentation (MoTW) Revision 7

STRS Function (DataBasic) (m618703+strs_f.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

STRS Function

Repeats the contents of each element in a dynamic array a specified number of times.

Syntax

STRS(dynArray, numRepeats)

Syntax Elements

dynArray A DataBasic expression that evaluates to a dynamic array.

numRepeats The required number of repeats. Decimal fractions are truncated (for example, 3.9 generates 3 repeats).

Return Value

A dynamic array with the same structure as dynArray, but with each element replaced by the original contents repeated numRepeats times (see Example).

If numRepeats evaluates to 0, an empty string is returned.

Example

ABC="X":@AM:"Y":@AM:"Z"
NEWARY = STRS(ABC, 3)

Sets NEWARY to "XXXAMYYYAMZZZ".

RealityV15.1 (MoTW) Revision 7Comment on this topic