TCharacterCasing (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following example demostrates the use of ToUpper and ToLower methods (of TCharacter class) to convert an unicode string to upper or to lower case.

Code

void __fastcall TMainForm::btUpperClick(TObject *Sender)
{
	/* Convert the string to upper-case */
	edtText->Text = TCharacter::ToUpper(edtText->Text);
}

void __fastcall TMainForm::btLowerClick(TObject *Sender)
{
	/* Convert the string to lower-case */
	edtText->Text = TCharacter::ToLower(edtText->Text);
}

Uses