mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-04 03:36:34 +02:00
Added Cyc_string_byte_length()
This commit is contained in:
parent
348ed7205c
commit
42507606a5
2 changed files with 7 additions and 0 deletions
|
@ -194,6 +194,7 @@ int binstr2int(const char *str);
|
||||||
int octstr2int(const char *str);
|
int octstr2int(const char *str);
|
||||||
object Cyc_string_append(void *data, object cont, int argc, object str1, ...);
|
object Cyc_string_append(void *data, object cont, int argc, object str1, ...);
|
||||||
object Cyc_string_length(void *data, object str);
|
object Cyc_string_length(void *data, object str);
|
||||||
|
object Cyc_string_byte_length(void *data, object str);
|
||||||
object Cyc_substring(void *data, object cont, object str, object start,
|
object Cyc_substring(void *data, object cont, object str, object start,
|
||||||
object end);
|
object end);
|
||||||
object Cyc_string_ref(void *data, object str, object k);
|
object Cyc_string_ref(void *data, object str, object k);
|
||||||
|
|
|
@ -2109,6 +2109,12 @@ object Cyc_string_length(void *data, object str)
|
||||||
return obj_int2obj(string_num_cp(str));
|
return obj_int2obj(string_num_cp(str));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object Cyc_string_byte_length(void *data, object str)
|
||||||
|
{
|
||||||
|
Cyc_check_str(data, str);
|
||||||
|
return obj_int2obj(string_len(str));
|
||||||
|
}
|
||||||
|
|
||||||
object Cyc_string_set(void *data, object str, object k, object chr)
|
object Cyc_string_set(void *data, object str, object k, object chr)
|
||||||
{
|
{
|
||||||
char *raw;
|
char *raw;
|
||||||
|
|
Loading…
Add table
Reference in a new issue