File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,16 @@ class CppStringT : public std::basic_string<CharT>
108108
109109 // === Methods =========================================
110110
111+ // --- capitalize() ------------------------------------
112+ // /** \brief In-place modifies the string with its first character capitalized and the rest lowercased. Returns a reference to the string*/
113+ inline CppStringT& capitalize () noexcept
114+ {
115+ this ->lower ();
116+ (*this )[0 ] = upper ((*this )[0 ]);
117+ return *this ;
118+ }
119+
120+
111121 // --- is_punctuation() --------------------------------
112122 /* * \brief Returns true if the string contains only one character and if this character belongs to the ASCII punctuation set. */
113123 inline const bool is_punctuation () const noexcept
You can’t perform that action at this time.
0 commit comments