Next: , Previous: , Up: strings   [Contents][Index]


14.5 Matching a string with a class

Function: mbfl_string_is_alpha_char char

Return true if char is in one of the ranges: ‘[a-z]’, ‘[A-Z]’.

Function: mbfl_string_is_digit_char char

Return true if char is in the range: 0-9.

Function: mbfl_string_is_alnum_char char

Return true if:

mbfl_string_is_alpha_char char || \
   mbfl_string_is_digit_char char
Function: mbfl_string_is_noblank_char char

Return true if char is none of the characters: ‘ ’, ‘\n’, ‘\r’, ‘\f’, ‘\t’. char is meant to be the unquoted version of the non–blank characters, the one obtained with:

$'char'
Function: mbfl_string_is_name_char char

Return true if mbfl_string_is_alnum_char() returns true when applied to char or char is an underscore, ‘_’.

Function: mbfl_string_is_identifier_char char

Return true if mbfl_string_is_alnum_char() returns true when applied to char or char is an underscore, ‘_’, or dash, ‘-’.

Function: mbfl_string_is_extended_identifier_char char

Like mbfl_string_is_identifier_char(), but also accept dots ‘.’.

Function: mbfl_string_is_alpha string
Function: mbfl_string_is_digit string
Function: mbfl_string_is_alnum string
Function: mbfl_string_is_noblank string
Function: mbfl_string_is_name string
Function: mbfl_string_is_identifier string
Function: mbfl_string_is_extended_identifier string

Return true if string is non–empty and the associated char function returns true for each character in string. As additional constraint:

Function: mbfl_string_is_username string

Return true if string is non–empty, all its characters are in the ranges [a-zA-Z0-9_-], the first character is in the range [a-zA-Z_]; else return false.

Function: mbfl_string_is_email_address string

Return true if string is non–empty and it matches the general shape of an email address; otherwise return false.

Function: mbfl_string_is_network_hostname string

Return true if string is non–empty and it matches the format of a network hostname; otherwise return false.

Function: mbfl_string_is_network_port string

Return true if string is non–empty and it matches the format of a network port number; otherwise return false.

Function: mbfl_string_is_network_ip_address string

Return true if string is non–empty and it matches the format of an IP address; otherwise return false.


Next: , Previous: , Up: strings   [Contents][Index]

This document describes version 3.0.0-devel.0 of Marcos Bash Functions Library.