]> Repositorios git - scryer-prolog.git/commitdiff
Rename `to_upper` to `upper` and `to_lower` to `lower`
authorAdrián Arroyo Calle <[email protected]>
Sat, 28 Oct 2023 17:16:07 +0000 (19:16 +0200)
committerAdrián Arroyo Calle <[email protected]>
Sat, 28 Oct 2023 17:16:07 +0000 (19:16 +0200)
src/lib/charsio.pl
src/machine/system_calls.rs

index d47d3642be8bad2e34747f0d9246ee16fee2b56a..7ac67c913f8214d257a44ae2fa18c1b29a45b24f 100644 (file)
@@ -105,8 +105,8 @@ extend_var_list_([V|Vs], N, VarList, NewVarList, VarType) :-
 % - `symbolic_control`
 % - `symbolic_hexadecimal`
 % - `upper`
-% - `to_lower(Lower)`
-% - `to_upper(Upper)`
+% - `lower(Lower)`
+% - `upper(Upper)`
 % - `whitespace`
 %
 % An example:
@@ -124,8 +124,8 @@ extend_var_list_([V|Vs], N, VarList, NewVarList, VarType) :-
 % ;  Type = octet
 % ;  Type = prolog
 % ;  Type = symbolic_control
-% ;  Type = to_lower("a")
-% ;  Type = to_upper("A")
+% ;  Type = lower("a")
+% ;  Type = upper("A")
 % ;  false.
 % ```
 %
@@ -168,8 +168,8 @@ ctype(sign).
 ctype(solo).
 ctype(symbolic_control).
 ctype(symbolic_hexadecimal).
-ctype(to_lower(_)).
-ctype(to_upper(_)).
+ctype(lower(_)).
+ctype(upper(_)).
 ctype(upper).
 ctype(whitespace).
 
index 27ad1c830dd65198ac6e3d28c29c8d760eb5fc51..9642ec3d59b3cc3f6570b2421e35ecb6679a60e0 100644 (file)
@@ -2997,13 +2997,13 @@ impl Machine {
                     .get_name_and_arity();
 
                 match (name, arity) {
-                    (atom!("to_upper"), 1) => {
+                    (atom!("upper"), 1) => {
                         let reg = self.machine_st.deref(self.machine_st.heap[s+1]);
                         let atom = AtomTable::build_with(&self.machine_st.atom_tbl, &c.to_uppercase().to_string());
                         let upper_str = string_as_cstr_cell!(atom);
                         unify!(self.machine_st, reg, upper_str);
                     }
-                    (atom!("to_lower"), 1) => {
+                    (atom!("lower"), 1) => {
                         let reg = self.machine_st.deref(self.machine_st.heap[s+1]);
                         let atom = AtomTable::build_with(&self.machine_st.atom_tbl, &c.to_lowercase().to_string());
                         let lower_str = string_as_cstr_cell!(atom);