aboutsummaryrefslogtreecommitdiff
path: root/builtins/string.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-27 13:39:12 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-27 13:39:12 -0500
commitce0e1c25e237849ecd8bea28b5c0ac6112374654 (patch)
treeb9168c1df899edf707714122d1717b0d9026d2e8 /builtins/string.h
parent55d44fe9f235b7916e3184c9a6da8922fd60b056 (diff)
Stop using namespace types
Diffstat (limited to 'builtins/string.h')
-rw-r--r--builtins/string.h27
1 files changed, 2 insertions, 25 deletions
diff --git a/builtins/string.h b/builtins/string.h
index f9dc83cc..278a2f9c 100644
--- a/builtins/string.h
+++ b/builtins/string.h
@@ -22,31 +22,6 @@ typedef struct {
int32_t index;
} find_result_t;
-typedef struct {
- TypeInfo type;
- CORD (*uppercased)(CORD s);
- CORD (*lowercased)(CORD s);
- CORD (*titlecased)(CORD s);
- bool (*has)(CORD s, CORD prefix, where_e where);
- bool (*ends_with)(CORD s, CORD suffix);
- CORD (*without)(CORD s, CORD target, where_e where);
- CORD (*without_suffix)(CORD s, CORD suffix);
- CORD (*trimmed)(CORD s, CORD trim_chars, where_e where);
- CORD (*slice)(CORD s, int64_t first, int64_t stride, int64_t length);
- char *(*c_string)(CORD str);
- CORD (*from_c_string)(char *str);
- find_result_t (*find)(CORD str, CORD pat);
- CORD (*replace)(CORD text, CORD pat, CORD replacement, int64_t limit);
- CORD (*quoted)(CORD text, bool colorize);
- Str_Array_t (*split)(CORD str, CORD split_chars);
- CORD (*join)(CORD glue, Str_Array_t pieces);
- bool (*equal)(CORD *x, CORD *y);
- int32_t (*compare)(CORD *x, CORD *y);
- int (*hash)(CORD *s, TypeInfo *type);
- CORD (*cord)(CORD *s, bool colorize, TypeInfo *type);
-} Str_namespace_t;
-extern Str_namespace_t Str;
-
CORD Str__as_str(const void *str, bool colorize, const TypeInfo *info);
CORD Str__quoted(CORD str, bool colorize);
int Str__compare(CORD *x, CORD *y);
@@ -64,4 +39,6 @@ CORD Str__replace(CORD text, CORD pat, CORD replacement, int64_t limit);
Str_Array_t Str__split(CORD str, CORD split);
CORD Str__join(CORD glue, Str_Array_t pieces);
+extern TypeInfo Str;
+
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0