MCPcopy Create free account
hub / github.com/crawl/crawl / uppercase_first

Function uppercase_first

crawl-ref/source/stringutil.cc:99–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99string uppercase_first(string s)
100{
101 // Incorrect due to those pesky Dutch having "ij" as a single letter (wtf?).
102 // Too bad, there's no standard function to handle that character, and I
103 // don't care enough.
104 char32_t c;
105 if (!s.empty())
106 {
107 utf8towc(&c, &s[0]);
108 wctoutf8(&s[0], towupper(c));
109 }
110 return s;
111}
112
113int codepoints(string str)
114{

Callers 15

describeMethod · 0.85
soh_monspecMethod · 0.85
_describe_cardsFunction · 0.85
god_speakerFunction · 0.85
wu_jian_sifu_messageFunction · 0.85
crawl_bane_nameFunction · 0.85
_sdump_religionFunction · 0.85
_describe_action_subtypeFunction · 0.85
zin_recite_textFunction · 0.85
get_god_dislikesFunction · 0.85
okawaru_killFunction · 0.85
get_god_likesFunction · 0.85

Calls 3

utf8towcFunction · 0.85
wctoutf8Function · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected