Answer the question
In order to leave comments, you need to log in
What does this structure mean?
Can you please explain what these lines of code mean.
struct chcp1251 {
static bool is_alpha(char ch) {
return (ch >= -64 && ch <= -1)
|| ch == -88
|| ch == -72
|| (ch >= 65 && ch <= 90)
|| (ch >= 97 && ch <= 122);
}
static bool is_digit(char ch) {
return ch >= 48 && ch <= 57;
}
};
Answer the question
In order to leave comments, you need to log in
Just some set of helpers for checking if characters belong to ranges.
chcp1251 - the name is shit. mk refers to chcp , but does not change the encoding.
1251 - reference to win1251
encoding
is_alpha - checks if a character is a letter
is_digit - checks if a character is a digit
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question