ds: formatting tweaks
This commit is contained in:
+30
-19
@@ -1,12 +1,12 @@
|
||||
#ifndef FX_DS_STRING_H_
|
||||
#define FX_DS_STRING_H_
|
||||
|
||||
#include <ctype.h>
|
||||
#include <fx/core/encoding.h>
|
||||
#include <fx/core/iterator.h>
|
||||
#include <fx/core/macros.h>
|
||||
#include <fx/core/status.h>
|
||||
#include <fx/core/stringstream.h>
|
||||
#include <ctype.h>
|
||||
|
||||
FX_DECLS_BEGIN;
|
||||
|
||||
@@ -77,30 +77,36 @@ FX_API fx_status fx_string_append_wc(fx_string *dest, fx_wchar c);
|
||||
FX_API fx_status fx_string_append_s(fx_string *dest, const fx_string *src);
|
||||
FX_API fx_status fx_string_append_cstr(fx_string *dest, const char *src);
|
||||
FX_API fx_status fx_string_append_wstr(fx_string *dest, const fx_wchar *src);
|
||||
FX_API fx_status fx_string_append_cstrf(fx_string *dest, const char *format, ...);
|
||||
FX_API fx_status
|
||||
fx_string_append_cstrf(fx_string *dest, const char *format, ...);
|
||||
|
||||
FX_API fx_status fx_string_prepend_c(fx_string *dest, char c);
|
||||
FX_API fx_status fx_string_prepend_wc(fx_string *dest, fx_wchar c);
|
||||
FX_API fx_status fx_string_prepend_cstr(fx_string *dest, const char *src);
|
||||
FX_API fx_status fx_string_prepend_wstr(fx_string *dest, const fx_wchar *src);
|
||||
FX_API fx_status fx_string_prepend_cstrf(fx_string *dest, const char *format, ...);
|
||||
FX_API fx_status
|
||||
fx_string_prepend_cstrf(fx_string *dest, const char *format, ...);
|
||||
|
||||
FX_API fx_status fx_string_insert_c(fx_string *dest, char c, size_t at);
|
||||
FX_API fx_status fx_string_insert_wc(fx_string *dest, fx_wchar c, size_t at);
|
||||
FX_API fx_status fx_string_insert_s(fx_string *dest, const fx_string *src, size_t at);
|
||||
FX_API fx_status fx_string_insert_cstr(fx_string *dest, const char *src, size_t at);
|
||||
FX_API fx_status fx_string_insert_wstr(
|
||||
fx_string *dest, const fx_wchar *src, size_t at);
|
||||
FX_API fx_status fx_string_insert_cstrn(
|
||||
fx_string *dest, const char *src, size_t len, size_t at);
|
||||
FX_API fx_status fx_string_insert_wstrn(
|
||||
fx_string *dest, const char *src, size_t len, size_t at);
|
||||
FX_API fx_status fx_string_insert_cstrf(
|
||||
fx_string *dest, size_t at, const char *format, ...);
|
||||
FX_API fx_status
|
||||
fx_string_insert_s(fx_string *dest, const fx_string *src, size_t at);
|
||||
FX_API fx_status
|
||||
fx_string_insert_cstr(fx_string *dest, const char *src, size_t at);
|
||||
FX_API fx_status
|
||||
fx_string_insert_wstr(fx_string *dest, const fx_wchar *src, size_t at);
|
||||
FX_API fx_status
|
||||
fx_string_insert_cstrn(fx_string *dest, const char *src, size_t len, size_t at);
|
||||
FX_API fx_status
|
||||
fx_string_insert_wstrn(fx_string *dest, const char *src, size_t len, size_t at);
|
||||
FX_API fx_status
|
||||
fx_string_insert_cstrf(fx_string *dest, size_t at, const char *format, ...);
|
||||
FX_API void fx_string_clear(fx_string *str);
|
||||
|
||||
FX_API fx_iterator *fx_string_tokenise(
|
||||
fx_string *str, const char *delims[], size_t nr_delims,
|
||||
fx_string *str,
|
||||
const char *delims[],
|
||||
size_t nr_delims,
|
||||
fx_string_tokenise_flags flags);
|
||||
|
||||
FX_API size_t fx_string_get_size(const fx_string *str, fx_strlen_flags flags);
|
||||
@@ -108,15 +114,20 @@ FX_API size_t fx_string_get_capacity(const fx_string *str);
|
||||
|
||||
FX_API bool fx_string_compare(const fx_string *a, const fx_string *b);
|
||||
|
||||
FX_API char fx_string_front(const fx_string *str);
|
||||
FX_API char fx_string_back(const fx_string *str);
|
||||
FX_API char fx_string_get_first_char(const fx_string *str);
|
||||
FX_API char fx_string_get_last_char(const fx_string *str);
|
||||
|
||||
FX_API void fx_string_pop_back(fx_string *str);
|
||||
|
||||
FX_API const char *fx_string_ptr(const fx_string *str);
|
||||
FX_API fx_string *fx_string_substr(const fx_string *str, size_t start, size_t len);
|
||||
FX_API const char *fx_string_get_cstr(const fx_string *str);
|
||||
FX_API fx_string *fx_string_get_substr(
|
||||
const fx_string *str,
|
||||
size_t start,
|
||||
size_t len);
|
||||
|
||||
FX_API int fx_string_iterator_begin(const fx_string *string, fx_string_iterator *it);
|
||||
FX_API int fx_string_iterator_begin(
|
||||
const fx_string *string,
|
||||
fx_string_iterator *it);
|
||||
FX_API bool fx_string_iterator_next(fx_string_iterator *it);
|
||||
// FX_API fx_status fx_string_iterator_erase(fx_string_iterator *it);
|
||||
FX_API bool fx_string_iterator_is_valid(const fx_string_iterator *it);
|
||||
|
||||
Reference in New Issue
Block a user