fn is_punctuation(input_str: &str) -> bool
Expand description
Helper function to determine if a string is a single punctuation character.
§Arguments
input_str
- A string slice to check.
§Returns
Returns true
if the string is a single punctuation character or symbol currency, otherwise
false
.
§Example
use lexer::is_punctuation;
assert!(is_punctuation("!"));
assert!(!is_punctuation("Hello"));
assert!(is_punctuation("$"));