mirror of
https://github.com/janet-lang/janet
synced 2024-11-24 17:27:18 +00:00
Update changelog (string module)
Also run `make format` on code.
This commit is contained in:
parent
c70d59edee
commit
4fa1b28cad
@ -2,7 +2,8 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## 0.5.0 - ??
|
||||
- Add debugger to repl that activates on errors or debug signal
|
||||
- Add `string/has-prefix?` and `string/has-suffix?` to string module.
|
||||
- Add simple debugger to repl that activates on errors or debug signal
|
||||
- Remove `*env*` and `*doc-width*`.
|
||||
- Add `fiber/getenv`, `fiber/setenv`, and `dyn`, and `setdyn`.
|
||||
- Add support for dynamic bindings (via the `dyn` and `setdyn` functions).
|
||||
|
@ -281,8 +281,8 @@ static Janet cfun_string_hasprefix(int32_t argc, Janet *argv) {
|
||||
int32_t prefix_len = janet_string_length(prefix);
|
||||
int32_t s_len = janet_string_length(s);
|
||||
return s_len < prefix_len
|
||||
? janet_wrap_false()
|
||||
: janet_wrap_boolean(memcmp(prefix, s, prefix_len) == 0);
|
||||
? janet_wrap_false()
|
||||
: janet_wrap_boolean(memcmp(prefix, s, prefix_len) == 0);
|
||||
}
|
||||
|
||||
static Janet cfun_string_hassuffix(int32_t argc, Janet *argv) {
|
||||
@ -292,8 +292,8 @@ static Janet cfun_string_hassuffix(int32_t argc, Janet *argv) {
|
||||
int32_t suffix_len = janet_string_length(suffix);
|
||||
int32_t s_len = janet_string_length(s);
|
||||
return s_len < suffix_len
|
||||
? janet_wrap_false()
|
||||
: janet_wrap_boolean(memcmp(suffix, s+s_len-suffix_len, suffix_len) == 0);
|
||||
? janet_wrap_false()
|
||||
: janet_wrap_boolean(memcmp(suffix, s + s_len - suffix_len, suffix_len) == 0);
|
||||
}
|
||||
|
||||
static Janet cfun_string_findall(int32_t argc, Janet *argv) {
|
||||
|
Loading…
Reference in New Issue
Block a user