diff options
Diffstat (limited to 'include/stc/csview.h')
| -rw-r--r-- | include/stc/csview.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/csview.h b/include/stc/csview.h index f41acf4f..11e42c97 100644 --- a/include/stc/csview.h +++ b/include/stc/csview.h @@ -165,7 +165,7 @@ STC_DEF csview_iter csview_advance(csview_iter it, intptr_t pos) { } STC_DEF intptr_t csview_find_sv(csview sv, csview search) { - char* res = stc_strnstrn(sv.buf, search.buf, sv.size, search.size); + char* res = stc_strnstrn(sv.buf, sv.size, search.buf, search.size); return res ? (res - sv.buf) : c_NPOS; } @@ -197,7 +197,7 @@ STC_DEF csview csview_slice_ex(csview sv, intptr_t p1, intptr_t p2) { STC_DEF csview csview_token(csview sv, const char* sep, intptr_t* start) { intptr_t sep_size = c_strlen(sep); csview slice = {sv.buf + *start, sv.size - *start}; - const char* res = stc_strnstrn(slice.buf, sep, slice.size, sep_size); + const char* res = stc_strnstrn(slice.buf, slice.size, sep, sep_size); csview tok = {slice.buf, res ? (res - slice.buf) : slice.size}; *start += tok.size + sep_size; return tok; |
