mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
parent
531a7eec1a
commit
bc43a413e1
@ -16,6 +16,7 @@
|
||||
(register from-chars (Fn [&(Array Char)] String))
|
||||
(register tail (λ [(Ref String)] String))
|
||||
(register format (Fn [&String &String] String))
|
||||
(register string-set! (Fn [&String Int Char] ()))
|
||||
|
||||
(defn /= [a b]
|
||||
(not (= (the (Ref String) a) b)))
|
||||
|
@ -8,6 +8,10 @@ void String_delete(String s) {
|
||||
CARP_FREE(s);
|
||||
}
|
||||
|
||||
void String_string_MINUS_set_BANG_(String *s, int i, char ch) {
|
||||
(*s)[i] = ch;
|
||||
}
|
||||
|
||||
String String_copy(String *s) {
|
||||
size_t len = strlen(*s) + 1;
|
||||
String ptr = CARP_MALLOC(len);
|
||||
|
Loading…
Reference in New Issue
Block a user