From e596ebd0c129913b7135210b23a50336b6f8556f Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Tue, 21 Apr 2020 19:18:40 -0700 Subject: chore: updating naming conventions --- include/.include/str.h | 26 +++++++++++++------------- include/libn.h | 1 + 2 files changed, 14 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/.include/str.h b/include/.include/str.h index 85051e4..29b5e1e 100644 --- a/include/.include/str.h +++ b/include/.include/str.h @@ -25,22 +25,22 @@ enum RuneMax = 0x10FFFF, }; -int utf8·fullRune(byte *s, int n); -byte *utf8·findRune(byte *s, long i); -int utf8·charToRune(Rune *r, byte *s); -int utf8·runeToChar(byte *s, Rune *r); +int utf8·fullrune(byte *s, int n); +byte *utf8·findrune(byte *s, long i); +int utf8·chartorune(Rune *r, byte *s); +int utf8·runetochar(byte *s, Rune *r); int utf8·len(byte *s); -int utf8·runeLen(Rune r); -int utf8·isLetter(Rune r); -int utf8·isDigit(Rune r); -int utf8·isSpace(Rune r); -int utf8·isTitle(Rune r); +int utf8·runelen(Rune r); +int utf8·isletter(Rune r); +int utf8·isdigit(Rune r); +int utf8·isspace(Rune r); +int utf8·istitle(Rune r); // ------------------------------------------------------------------------- // Dynamic string functions -string str·newCap(const byte *s, vlong len, vlong cap); -string str·newLen(const byte *s, vlong len); +string str·newcap(const byte *s, vlong len, vlong cap); +string str·newlen(const byte *s, vlong len); string str·new(const byte *s); string str·newf(const byte *fmt, ...); void str·free(string s); @@ -49,10 +49,10 @@ int str·cap(const string s); string str·clear(string s); string str·grow(string s, vlong delta); string str·fit(string s); -string str·appendCount(string s, vlong len, const byte *b); +string str·appendcount(string s, vlong len, const byte *b); string str·append(string s, const byte* b); string str·appendf(string s, const byte* fmt, ...); -string str·appendByte(string s, const byte b); +string str·appendbyte(string s, const byte b); bool str·equals(const string s, const string t); int str·find(string s, const byte* substr); void str·lower(string s); diff --git a/include/libn.h b/include/libn.h index 0fbcdc7..203a477 100644 --- a/include/libn.h +++ b/include/libn.h @@ -98,6 +98,7 @@ enum SeekPos Stream *io·open(byte *name, byte *mode); error io·close(Stream *s); byte io·getbyte(Stream *s); +error io·ungetbyte(Stream *s, byte c); vlong io·read(Stream *s, int sz, int n, void *buf); int io·readln(Stream *s, int n, byte* buf); error io·putbyte(Stream *s, byte c); -- cgit v1.2.1