cStringString to repeat.
AdvPL GuideReplicate(cString,nCount) -> cRetRepeats a string a specified number of times.
Concatenates copies of the input; zero repetitions produce an empty string. The TDN page has historical coverage and states a 65,535-character limit for that contract; do not generalize it to every current build and setting. Bound requested sizes before repeating external data. The GitHub example uses TamSX3 for field padding; this adaptation is memory-only. (Sources: refs. 1–2.)
Replicate(cString,nCount) -> cRetcStringString to repeat.
nCountRepetition count.
Character: concatenated copies.
#Include "Protheus.ch"
User Function Ed617()
// Memory-only operation; input remains unchanged.
ConOut(Replicate("ab",3))
Return NilExpected result: ababab. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.