Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

Capital

Capital( <cFrase> )

Adjusts a phrase to capitalized uppercase/lowercase.

StringFormattingCharacter
01 · OVERVIEW

Overview

Capital() converts the first letter of each word to uppercase and the rest to lowercase, helping standardize display text.

02 · SYNTAX

Syntax

Capital( <cFrase> )

Parameters

cPhrase
CharacterRequired

Text to be formatted.

03 · PRACTICAL EXAMPLE

Formatting a phrase

#Include "TOTVS.ch"

User Function ExCapital()
    Local cTexto := "tEXTO de EXEMPLO"

    MsgInfo(Capital(cTexto)) // Texto De Exemplo
Return
Expected result

The text is displayed with each word starting in uppercase.

BEST PRACTICES
  • Use para apresentação de textos simples.
  • Revise nomes próprios, siglas e termos técnicos, pois a capitalização automática pode não respeitar todas as exceções.

Related content

REFERENCES
  1. Help ADVPL.chm. Help AdvPL/APMSLib, documentação oficial histórica, 15 mar. 2004. Conteúdo resumido, reorganizado e marcado para revisão contra documentação atual da TOTVS quando disponível.
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