Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cb3ab4c

Browse filesBrowse files
committed
Add String::isEmpty()
1 parent 65633ce commit cb3ab4c
Copy full SHA for cb3ab4c

File tree

1 file changed

+1
-0
lines changed
Filter options

1 file changed

+1
-0
lines changed

‎api/String.h

Copy file name to clipboardExpand all lines: api/String.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class String
8989
// invalid string (i.e., "if (s)" will be true afterwards)
9090
bool reserve(unsigned int size);
9191
inline unsigned int length(void) const {return len;}
92+
inline bool isEmpty(void) const { return length() == 0; }
9293

9394
// creates a copy of the assigned value. if the value is null or
9495
// invalid, or if the memory allocation fails, the string will be

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.