Class Char

Class represents an character.

Methods


(char) char from unicode code <int c>

Creates a character from unicode character code 'c'

Parameters

Return value

Example

main
  char c = char from unicode code 32
  print c  // LOG: " "
          

(int) <char c>.get unicode code

Returns the unicode code of tha character 'c'

Parameters

Return value

Example

main
  int c = ' '.get unicode code
  print c  // LOG: "32"
          

(bool) <char c1> == <char c2>

Test whether parameters have the same value.

Parameters

Return value

Example

main
  string s1 = "ABC"
  string s2 = "AbC"
  bool resut = s1[1] == s2[1]   // result == false
        

(bool) <char c1> < <char c2>

Test whether c1 is less than c2.

Parameters

Return value

(bool) <char c1> <= <char c2>

Test whether c1 is less than or equal to c2.

Parameters

Return value

(bool) <char c1> != <char c2>

Test whether parameters are not equal.

Parameters

Return value

Example

main
  string s1 = "ABC"
  string s2 = "AbC"
  bool resut = s1[1] != s2[1]   // result == false
        

(bool) <char c1> > <char c2>

Test whether c1 is greater than c2.

Parameters

Return value

(bool) <char c1> >= <char c2>

Test whether c1 is greater than or equal to c2.

Parameters

Return value

<char c>.to lower case

Modify character 'c' to lower case.

Parameters

Example

main
  string s = "ABC"
  s[1].to lower case
  print s  // LOG: "AbC"
          

<char c>.to upper case

Modify character 'c' to upper case.

Parameters

Example

main
  string s = "abc"
  s[1].to upper case
  print s  // LOG: "aBc"
          

(char) <char c>.as lower case

Return the lower case version of character 'c'.

Parameters

Return value

Example

main
  string s = "ABC"
  s[1] = s[1].as lower case
  print s  // LOG: "AbC"
          

(char) <char c>.as upper case

Return the upper case version of character 'c'.

Parameters

Return value

Example

main
  string s = "abc"
  s[1] = s[1].as upper case
  print s  // LOG: "aBc"
          

(bool) <char c>.is letter

Check if character 'c' is a letter.

Parameters

Return value

Example

main
  string s = "abc"
  if s[1].is letter
    print "is letter"  // LOG: is letter
          

(bool) <char c>.is digit

Check if the character 'c' is a digit 0-9.

Parameters

Return value

Example

main
  string s = "123"
  if s[1].is digit
    print "is digit"  // LOG: is digit
          

(bool) <char c>.is whitespace

Check if the character 'c' is a white-space character.

Parameters

Return value

Example

main
  string s = "a b"
  if s[1].is whitespace
    print "is space"  // LOG: is space
          

(char) <char source> .copy

Creates a copy of source.

Parameters

Return value

Example

main
  char c1 = 'a'
  char c2 = c1.copy   // c2 == 'a'
  

(string) <char c>

Returns character as string.

Parameters

Return value

Example

main
  char c = 'a'
  string s = c   // s == "a"
  

(char) LF

Return character code 10.

Return value

Example

main
  char c1 = LF
  char c2 = char from unicode code 10
  bool result = c1 == c2                  // result == true
  

(char) CR

Return character code 13.

Return value

Example

main
  char c1 = CR
  char c2 = char from unicode code 13
  bool result = c1 == c2                  // result == true
  

(char) TAB

Return character code 9.

Return value

Example

main
  char c1 = TAB
  char c2 = char from unicode code 9
  bool result = c1 == c2                  // result == true