aboutsummaryrefslogtreecommitdiff
path: root/src/string.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-05-21 20:47:52 +0100
committergingerBill <bill@gingerbill.org>2018-05-21 20:47:52 +0100
commit5b6770f3d297c0639bdbe8b1b029616c16669165 (patch)
tree79053a455efde40e77b4dc5ef1aa92f59c907523 /src/string.cpp
parent718b80ba398b8980c37f79dded101bcf20d187d2 (diff)
Parse directories to be packages
Diffstat (limited to 'src/string.cpp')
-rw-r--r--src/string.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string.cpp b/src/string.cpp
index 470530298..16ba3c951 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -82,6 +82,10 @@ gb_inline String make_string_c(char *text) {
return make_string(cast(u8 *)cast(void *)text, gb_strlen(text));
}
+gb_inline String16 make_string16_c(wchar_t *text) {
+ return make_string16(text, string16_len(text));
+}
+
String substring(String const &s, isize lo, isize hi) {
isize max = s.len;
GB_ASSERT_MSG(lo <= hi && hi <= max, "%td..%td..%td", lo, hi, max);