We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 784f0d4 commit 159a340Copy full SHA for 159a340
src/framework/NetString.h
@@ -160,11 +160,17 @@ namespace System
160
161
bool StartsWith(const String& s) const
162
{
163
+ if (String::IsNullOrEmpty(s)){
164
+ return false;
165
+ }
166
return (IndexOf(s)==0);
167
}
168
169
bool EndsWith(const String& s) const
170
171
172
173
174
return (IndexOf(s)==Length()-s.Length());
175
176
@@ -213,6 +219,11 @@ namespace System
213
219
s.m_str.erase(s.m_str.find_first_not_of(" \n\r\t")+1);
214
220
return s;
215
221
222
+
223
+ static bool IsNullOrEmpty(const String &s)
224
+ {
225
+ retunr (s.Length()==0);
226
216
227
};
217
228
218
229
inline String operator+(const String& a, const String& b)
0 commit comments