File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1305,6 +1305,26 @@ namespace pcs // i.e. "pythonic c++ strings"
13051305 }
13061306
13071307
1308+ // --- strip() -----------------------------------------
1309+ /* * \brief Returns a copy of the string with the leading and trailing characters removed.
1310+ *
1311+ * The passed string specifies the set of characters to be removed.
1312+ * The chars argument is not a prefix; rather, all combinations of
1313+ * its values are stripped.
1314+ */
1315+ inline CppStringT strip (const CppStringT& prefix) const noexcept
1316+ {
1317+ return this ->rstrip (prefix).lstrip (prefix);
1318+ }
1319+
1320+ /* * \brief Returns a copy of the string with the leading and trailing whitespaces removed. */
1321+ inline CppStringT strip () const noexcept
1322+ {
1323+ return this ->rstrip ().lstrip ();
1324+ }
1325+
1326+
1327+
13081328 // --- title() -----------------------------------------
13091329 /* * \brief Returns a titlecased copy of the string where words start with an uppercase character and the remaining characters are lowercase. */
13101330 inline CppStringT title () const noexcept
You can’t perform that action at this time.
0 commit comments