File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -108,10 +108,10 @@ class CppStringT : public std::basic_string<CharT>
108108 // === Methods =========================================
109109
110110 // --- is_punctuation ----------------------------------
111- /* * \brief Returns true if a character belongs to ASCII punctuation set. */
112- inline const bool is_punctuation (const value_type ch ) noexcept
111+ /* * \brief Returns true if the string contains only one character and if this character belongs to the ASCII punctuation set. */
112+ inline const bool is_punctuation (const MyBaseClass& str ) noexcept
113113 {
114- return _ASCII_PUNCT_DATA.contains (ch );
114+ return str. size == 1 && _ASCII_PUNCT_DATA.contains (str[ 0 ] );
115115 }
116116
117117 // --- is_space ----------------------------------------
@@ -126,7 +126,7 @@ class CppStringT : public std::basic_string<CharT>
126126 if (str.size () == 0 )
127127 return false ;
128128 for (auto & c : str)
129- if (std::find (str .cbegin (), str .cend (), c) == str .cend ())
129+ if (std::find (_ASCII_SEP .cbegin (), _ASCII_SEP .cend (), c) == _ASCII_SEP .cend ())
130130 return false ;
131131 return true ;
132132 }
You can’t perform that action at this time.
0 commit comments