chartype
Reactive icon

CharType

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 06 April 2023
 by 
0.0
 (0 ratings)
chartype

CharType

Documentation
1.0.0

How to use CharType


Description

This component contains a JavaScript utility to be used to check the type of a character based on 3 specific types: number, text and special. They will be evaluated as:

number: 1234567890

text: ABCDEFGHIJKLMNOPQRSTUVWXYZÁÂÀÇÈÉËÊÑÌÍÎÏÖÒÓÔÕÚÛÙÜ

special: !"#$%&()*,./:;?@[\]^_`´{|}~+<=>

If the character is not in this list, the function will not return any value.

---------------------------------------------------------------------

(Function) CharType

It receives the character via parameter and classifies it as a number, text or special, according to the predefined types.

Parameters
Caracter: Text. Mandatory.
LetterOrDescription: Boolean. Optional (default: False)

Output
CaracterType: Type: Text.


Examples

CharType(“7”) -> CaracterType: “n”
CharType(“7”,true) -> CaracterType: “number”


CharType(“a”) -> CaracterType: “t”
CharType(“a”,true) -> CaracterType: “text”


CharType(“!”) -> CaracterType: “s”
CharType(“!”,true) -> CaracterType: “special”