cTextInput text.
AdvPL GuideLeft(cText,nCount) -> cPrefixExtracts a string prefix.
nCount defines how many positions to copy from the left. If it exceeds length, the full string is returned; zero or negative returns empty. The example uses ASCII to avoid assuming Unicode-character counting in the environment encoding. (Sources: refs. 1–1.)
Left(cText,nCount) -> cPrefixcTextInput text.
nCountNumber of positions.
Prefix string or empty string.
#Include "Protheus.ch"
User Function Ed505()
// Explicit extraction bounds.
ConOut(Left("ED0102",4))
ConOut("["+Left("ED01",0)+"]")
Return NilDisplays ED01 and []. 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.