Difference between revisions of "Documentation/How Tos/Calc: REPT function"

From Apache OpenOffice Wiki
Jump to: navigation, search
(REPT: the whole "comprises" the parts and the parts "compose" the whole; the idiom "compose of" is controversial and ambiguous. "include" is uncontroversial, and plain & simple, like the truth - end of editorial)
Line 50: Line 50:
 
:: returns <tt>'''xyz'''</tt> where <tt>'''x'''</tt>,  <tt>'''y'''</tt>, <tt>'''z'''</tt> are three randomly independent digits.
 
:: returns <tt>'''xyz'''</tt> where <tt>'''x'''</tt>,  <tt>'''y'''</tt>, <tt>'''z'''</tt> are three randomly independent digits.
 
    
 
    
{{Documentation/SeeAlso|
+
{{SeeAlso|EN|
 
* [[Documentation/How_Tos/Calc: CONCATENATE function|CONCATENATE]]
 
* [[Documentation/How_Tos/Calc: CONCATENATE function|CONCATENATE]]
  

Revision as of 07:23, 17 July 2018


REPT

returns a text string which includes repetitions of another text string.

Syntax:

REPT(text; number)

returns number copies of text, joined together.

Example:

  • REPT("ha"; 7)
returns hahahahahahaha!
  • REPT(ROUND(RAND()*10); 3)
returns nnn where n is a random digit repeated three times, while:
CONCATENATE(ROUND(RAND()*10); ROUND(RAND()*10); ROUND(RAND()*10))
returns xyz where x, y, z are three randomly independent digits.



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_REPT_function&oldid=243329"
Views
Personal tools
Navigation
Tools