Manuals/calci/REPT

From ZCubes Wiki
Revision as of 08:18, 29 April 2015 by Swapna (talk | contribs)
Jump to navigation Jump to search

REPT(txt, numt)

  • where is a text that is to be repeated
  • is a positive number that specifies how many number of times to repeat the text.

REPT() repeats a text for specified number of times.

Description

REPT(txt, numt)

For Example,

REPT("*",5) returns *****

  • should be enclosed in quotes.
  • should be a positive number, else Calci ignores it and returns an empty text ("").
  • If is equal to zero, Calci returns an empty text ("").
  • If is a non-integer, Calci rounds it and displays the output.

Example

Function Output
REPT("ABCD*",4) ABCD*ABCD*ABCD*ABCD*
REPT("<>",3) <><><>
REPT("JOHN",0.2) JOHN
REPT("+",3.6) ++++

Related Videos

REPT

See Also

References