aboutsummaryrefslogtreecommitdiff
path: root/include/base/string.h
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-12-05 16:16:21 -0800
committerNicholas Noll <nbnoll@eml.cc>2021-12-05 16:16:21 -0800
commit07e77936d535e58b0aeb4f2a11400c1050556739 (patch)
treefb50fad6436ecbc159505bee73a92cd289b99a07 /include/base/string.h
parentb48327d357e0818d1a6ae2a064cfa7d1567e1242 (diff)
Feat: added math library
Used Plan9's libc as starting point. This cleans up dangling references due to loss of libc.
Diffstat (limited to 'include/base/string.h')
-rw-r--r--include/base/string.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/base/string.h b/include/base/string.h
index 238ebf9..a59c553 100644
--- a/include/base/string.h
+++ b/include/base/string.h
@@ -29,9 +29,15 @@ int str·compare(char *, char *);
int str·ncompare(char *, intptr len, char *);
int str·ecompare(char *, char *end, char *);
-int str·atoi(char *s);
+/* old school interfaces (no error checking) */
+long str·atoi(char *s);
+double str·atof(char *s);
char *str·itoa(char *s, int x);
+/* nicer */
+vlong str·asint(char *s, char **end);
+double str·asfloat(char *s, char **end);
+
/* augmented string functions */
string string·makecap(char *s, vlong len, vlong cap);
string string·makelen(char *s, vlong len);