Use toupper, iswspace from cwctype header
This commit is contained in:
parent
d41a8ca50b
commit
43e4826bb7
|
@ -2,7 +2,7 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <locale>
|
#include <cwctype>
|
||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -62,7 +62,7 @@ struct Scanner {
|
||||||
string scan_tag_name(TSLexer *lexer) {
|
string scan_tag_name(TSLexer *lexer) {
|
||||||
string tag_name;
|
string tag_name;
|
||||||
while (iswalpha(lexer->lookahead) || lexer->lookahead == '-' || lexer->lookahead == ':') {
|
while (iswalpha(lexer->lookahead) || lexer->lookahead == '-' || lexer->lookahead == ':') {
|
||||||
tag_name += std::toupper(lexer->lookahead);
|
tag_name += towupper(lexer->lookahead);
|
||||||
lexer->advance(lexer, false);
|
lexer->advance(lexer, false);
|
||||||
}
|
}
|
||||||
return tag_name;
|
return tag_name;
|
||||||
|
|
Loading…
Reference in New Issue