ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / String functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
CharactType (Function)
In french: CaractType
Returns information about the type of character.
Example
CharactType("A") // the function returns ctAlpha|ctUppercase
 
CharactType("é") // the function returns ctAlpha|ctLowercase|ctAccent
 
// Checks if a character is a letter
IF BinaryAND(CharactType("c"), ctAlpha) <> 0 THEN
Trace("This character is a letter")
END
Syntax
<Result> = CharactType(<Character>)
<Result>: Integer constant (or combination of constants)
Type of character analyzed:
ctAccentAccented or diacritical character.
The ctAccent constant can only be combined with ctAlpha.
ctAlphaLetter.
ctLowercaseLowercase character.
The ctLowercase constant can only be combined with ctAlpha.
ctNumericNumeric character.
ctPunctuationPunctuation character.
ctSpaceSpace.
ctUppercaseUppercase character.
The ctUppercase constant can only be combined with ctAlpha.
<Character>: Character string
Character to use.
Remarks
  • The character 0 returns 0.
  • Various character characteristics can be combined: a character can be an accented letter. In this case, the following constants can be combined: ctAccent, ctAlpha, ctUppercase and ctLowercase.
    To check a single characteristic (for example, if the character is a letter): it is recommended to test the corresponding constant with BinaryAND or with the "&" operator. For example:
    // Checks if a character is a letter
    IF BinaryAND(CharactType("c"), ctAlpha) <> 0 THEN
    Trace("This character is a letter")
    END
Business / UI classification: Neutral code
Component: wd290vm.dll
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help