Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

AllTrim

AllTrim( <cString> )

Removes leading and trailing blank spaces from a string.

StringsConversionData cleanup
01 · OVERVIEW

Overview

Removes leading and trailing blank spaces from a 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.

02 · SYNTAX

Syntax

AllTrim( <cString> )

Parameters

cString
CharacterRequired

Parameter used by the function. Check the Portuguese source page for the detailed original wording while this entry remains under review.

03 · PRACTICAL EXAMPLE

Removing side spaces

User Function ExAllTrim()
    Local cName := "  Test Customer   "

    MsgInfo("Name: " + AllTrim(cName))
Return
Expected result

The message shows the name without leading or trailing spaces.

BEST PRACTICES
  • Use ao montar mensagens com campos caractere de tabelas do Protheus.
  • Não remove espaços internos; apenas as extremidades da string.
COMMON PITFALLS
  • This entry is under review because it was structured from historical training material.
  • Confirm behavior in the Protheus/AppServer release used in your environment.

Related content

REFERENCES
  1. Programação em ADVPL Completo. Training material recorded in the official documentation, section 4.5.4, p. 45-50. Summarized, reviewed and examples adapted.
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