Please, how can i convert a matched string in lex (yytext) from small letters to capital letters? If 开发者_JS百科you can provide me an example i would be grateful.
Thanks in advance for your help.
The toupper
function from the c standard library?
You'll have to loop over the string of course, so you probably want to wrap it up in a function of your own, or if you are already using some external utility library (glib, qt, ...) they may provide a general string case fixer.
Glib seem to provide g_string_ascii_up
.
精彩评论