Format | strtolist(+STRING, -LIST) | ||||||
---|---|---|---|---|---|---|---|
Arguments |
| ||||||
Convert a string into a list of ASCII codes. | |||||||
> ?- strtolist("abc", X). X: < 97, 98, 99 > |
Format | strtodlist(+STRING, -LIST, -DLIST) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Arguments |
| |||||||||
Convert a string into a list of ASCII codes and add other list to that list. |
Format | listtostr(+LIST, -STRING) | ||||||
---|---|---|---|---|---|---|---|
Arguments |
| ||||||
Note | If the list include a 0, the return is undefined. | ||||||
Convert a list of ASCII codes into a string | |||||||
> ?- listtostr([65,66,67], X). X: "ABC" |
Format | strcat(+STR1,+STR2,-RET) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Arguments |
| |||||||||
Concatenate strings. |
Format | strlen(+STR,-LEN) | ||||||
---|---|---|---|---|---|---|---|
Arguments |
| ||||||
Length of string |
Format | strtotype(+STRING, -TYPE) |
---|---|
Note | In the case of the type name isn't defined, the function fails. |
Convert a string into a type. | |
> ?- strtotype("assert/1", X). X: assert/1 |
Format | strtotype(+MODULE,+STRING, -TYPE) | |||
---|---|---|---|---|
Arguments |
| |||
Note | In the case of the type name isn't defined, the function fails. | |||
Convert a string into a type in a module. | ||||
> ?- strtotype("assert/1", X). X: assert/1 |
Format | typetostr(+TYPE, -STRING) | ||||||
---|---|---|---|---|---|---|---|
Arguments |
| ||||||
Note | The case of numeric type is not considered. typetostr(1,X) returns integer. | ||||||
Convert a type into an string. This gets simple name of type. | |||||||
> ?- typetostr("assert/1", X). X: assert/1 |
Format | feattostr(+TYPE, -STRING) | ||||||
---|---|---|---|---|---|---|---|
Arguments |
| ||||||
convert a feature to a string |
Format | inttostr(+INT, -STRING) | ||||||
---|---|---|---|---|---|---|---|
Arguments |
| ||||||
Convert an integer into an string | |||||||
> ?- inttostr(123, X). X: "123" |
Format | strtoint(+STRING, -INT) | ||||||
---|---|---|---|---|---|---|---|
Arguments |
| ||||||
Convert a string into an integer | |||||||
> ?- inttostr(123, X). X: "123" |
Format | floattostr(+FLOAT, -STRING) | ||||||
---|---|---|---|---|---|---|---|
Arguments |
| ||||||
Convert a float into a string. | |||||||
> ?- floattostr(1.23, X). X: "1.23000" |
Format | strtofloat(+STRING, -FLOAT) | ||||||
---|---|---|---|---|---|---|---|
Arguments |
| ||||||
Convert a float into a string. | |||||||
> ?- strtofloat("1.23", X). X: 1.23000 |