cCaractereParameter used by the function. Check the Portuguese source page for the detailed original wording while this entry remains under review.
AdvPL GuideAt( <cCaractere>, <cString> )Returns the first position of one text inside another string.
Returns the first position of one text inside another string. This page was created from the historical training material and structured for quick reference, with practical notes and cautious use in current Protheus environments.
At( <cCaractere>, <cString> )cCaractereParameter used by the function. Check the Portuguese source page for the detailed original wording while this entry remains under review.
cStringParameter used by the function. Check the Portuguese source page for the detailed original wording while this entry remains under review.
User Function ExAt()
Local cEmail := "user@company.com"
Local nPosition := At("@", cEmail)
If nPosition > 0
MsgInfo("User: " + SubStr(cEmail, 1, nPosition - 1))
EndIf
ReturnThe @ position allows extracting the user part before the domain.
© 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.