diff options
| author | Tyge Løvset <[email protected]> | 2022-12-20 10:59:31 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-12-20 10:59:31 +0100 |
| commit | 21817cae767d72e6007150b639f9365e35502173 (patch) | |
| tree | 4c897b401c75a243f11c6ea8cf0ca8699376a680 /include/stc/csview.h | |
| parent | 6167fa5e361b2954440594cb693f25f643eb9e0a (diff) | |
| download | STC-modified-21817cae767d72e6007150b639f9365e35502173.tar.gz STC-modified-21817cae767d72e6007150b639f9365e35502173.zip | |
Renamed c_sv() => c_SV() and reverted cstr_new() => cstr_lit(). Old names are deprecated (not removed).
Diffstat (limited to 'include/stc/csview.h')
| -rw-r--r-- | include/stc/csview.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/stc/csview.h b/include/stc/csview.h index e0f2ad0e..972bc788 100644 --- a/include/stc/csview.h +++ b/include/stc/csview.h @@ -27,11 +27,12 @@ #include "forward.h" #include "utf8.h" -#define csview_NULL c_sv1("") +#define csview_NULL c_SV1("") #define csview_init() csview_NULL #define csview_drop(p) c_default_drop(p) #define csview_clone(sv) c_default_clone(sv) -#define csview_from_n(str, n) c_sv2(str, n) +#define csview_lit(literal) c_SV1(literal) +#define csview_from_n(str, n) c_SV2(str, n) STC_API size_t csview_find_sv(csview sv, csview search); @@ -46,7 +47,7 @@ STC_INLINE bool csview_equals(csview sv, const char* str) { size_t n = strlen(str); return sv.size == n && !memcmp(sv.str, str, n); } STC_INLINE size_t csview_find(csview sv, const char* str) - { return csview_find_sv(sv, c_sv(str, strlen(str))); } + { return csview_find_sv(sv, c_SV(str, strlen(str))); } STC_INLINE bool csview_contains(csview sv, const char* str) { return csview_find(sv, str) != c_NPOS; } |
