History

ckdoc generate index.html plus several enhancements (spencer + ge)

Ge Wang committed 3 years ago

Commit ff084df1 parent cd9bf567 files · +217 −63Browse files

Showing the changes to src/core/util_string.cpp (1 of 7 files). Show all

Unified · Split

src/core/util_string.cpp+18−0
@@ -124,6 +124,24 @@ string toupper( const string & str ) · 123 unmodified lines
124 124
125 125
126 126
127//-----------------------------------------------------------------------------
128// name: capitalize()
129// capitalize first character
130//-----------------------------------------------------------------------------
131string capitalize( const string & s )
132{
133 // copy
134 string retval = s;
135 // if not empty and first character is a lower-case letter
136 if( retval.length() > 0 && retval[0] >= 'a' && retval[0] <= 'z' )
137 retval[0] -= 32;
138 // done
139 return retval;
140}
141
142
143
144
127//-----------------------------------------------------------------------------145//-----------------------------------------------------------------------------
128// name: trim()146// name: trim()
129// desc: ...147// desc: ...

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t