Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

LTrim

LTrim(cText) -> cResult

Removes leading blank spaces.

LTrimAdvPL
01 · OVERVIEW

Overview

Trailing spaces remain. AllTrim handles both ends and RTrim the right end. Do not assume removal of tabs or every Unicode whitespace character. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

LTrim(cText) -> cResult

Parameters

cText
CharacterRequired

Input text.

Return value

Transformed string.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed514()
    // Local transformation without changing records.
    ConOut("["+LTrim("  ED01  ")+"]")
Return Nil
Expected result

Result: [ED01 ], retaining two trailing spaces. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Normalize only when required by the rule; do not automatically alter passwords or case-sensitive identifiers.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. LTrim. TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha