1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-25 07:50:27 +00:00

Update changelog (string module)

Also run `make format` on code.
This commit is contained in:
Calvin Rose 2019-05-04 10:11:36 -04:00
parent c70d59edee
commit 4fa1b28cad
2 changed files with 6 additions and 5 deletions

View File

@ -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).

View File

@ -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) {