Crate qndr[][src]

Functions

The allow_alphabets_only fn takes a &str and check that it should only consist of alphabets. It will return false even if one non-alphabetic char is found

The allow_alphanumeric_only fn takes a &str and check to see that it should only consist of alpha-numerical chars. The fn will return false even if one non-alpha-numerical char is found.

The allow_numbers_only fn takes a &str and will check that it should only consist of numerical chars.The fn will return false even if one non-numeric char is found.

The alphabets_with_symbols fn will allow just alphabets and the selected symbols e.g ! , @ etc. It takes a &str (sample ) and another &str with allowed symbols. It will return true only if the sample string has only alphabets and the allowed symbols provided.

This function checks if the sample &str begins with the provided character or not. Return true if it does.

This function checks if the sample &str begins with an alphabet or not. Return true if it does.

The begin_with_alphanumeric function checks if the sample &str begins with an alphanumeric or not.

This function checks if the sample &str begins with a number or not. Return true if it does.

This function will check the provided sample &str and check that it should only contain the provided characters.

This function checks if the sample &str ends with the provided character or not. Return true if it does.

This function checks if the sample &str begins with an alphabet or not. Return true ifit does.

The end_with_alphanumeric function checks if the sample &str ends with an alphanumeric or not. Return true if it does.

This function checks if the sample &str ends with a number or not.

The get_alphabets fn takes a &str and return (as a new string) all the alphabetic chars.

The get_alphanumeric fn takes a &str and return (as a new string) of all the alpha-numeric chars.

The get_non_alphabets fn takes a &str and returns (as a new string) all the non alphabets chars .

The get_non_alphanumeric pub fn takes &str and returns (as a new string) of all the non Alpha-Numeric chars.

The get_non_numbers fn takes a &str and returns (as a new string) of all the non-numeric chars .

The get_numbers fn takes a &str and return (as a new string) of all the numeric chars.

The no_caps function will return None even if a single Capital character is found in the provided sample &str. Any character other than a capital case alphabet is OK

We use this pub fn if we want to allow just numbers and few selected symbols e.g ! , @ etc. It takes a &str (the sample string) and another &str with allowed symbols. It will return true only of the sample string has only numbers and the allowed symbols provided.

The data presented to this function should be alphabatic and in all caps. If any char found that is not a capital alphabet the function will return false.
The sample &str should be entirely comprising of ABCDEFGHIJKLMNOPQRSTUVWXYZ

This function will remove all characters from the sample &str provided by the second argument.

This fn converts a &String into a Vec of chars