Skip to content

Commit 957603c

Browse files
committed
Add compare-dstring-alphabetically comparator
Seems like something that's done frequently; no point everyone duplicating this simple helper.
1 parent 93b3e9c commit 957603c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/util/dstring.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,9 @@ struct hash<dstringt> // NOLINT(readability/identifiers)
198198
};
199199
}
200200

201+
inline bool dstring_string_cmp(const dstringt &a, const dstringt &b)
202+
{
203+
return as_string(a) < as_string(b);
204+
}
205+
201206
#endif // CPROVER_UTIL_DSTRING_H

0 commit comments

Comments
 (0)