Module string

Predicates for manipulating strings

Contents

Predicate


Top of this page Contents Index of this package LiLFeS Documents LiLFeS Home Page Tsujii laboratory

Predicate

strtolist/2

Formatstrtolist(+STRING, -LIST)
Arguments
+STRINGstring Character string
-LISTlist List of ASCII codes
Convert a string into a list of ASCII codes.
> ?- strtolist("abc", X).
 X: < 97, 98, 99 > 

strtodlist/3

Formatstrtodlist(+STRING, -LIST, -DLIST)
Arguments
+STRINGstring Character string
-LISTlist List of ASCII codes
-DLISTlist Tail of the list
Convert a string into a list of ASCII codes and add other list to that list.

listtostr/2

Formatlisttostr(+LIST, -STRING)
Arguments
+LISTlist List of ASCII codes
-STRINGstring Character string
NoteIf 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" 

strcat/3

Formatstrcat(+STR1,+STR2,-RET)
Arguments
+STR1string string1
+STR2string string2
-RETstring returned string
Concatenate strings.

strlen/2

Formatstrlen(+STR,-LEN)
Arguments
+STRstring string
-LENstring length of string
Length of string

strtotype/2

Formatstrtotype(+STRING, -TYPE)
NoteIn 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 

strtotype/3

Formatstrtotype(+MODULE,+STRING, -TYPE)
Arguments
+MODULEstring module name
NoteIn 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 

typetostr/2

Formattypetostr(+TYPE, -STRING)
Arguments
+TYPEbot Type name
-STRINGstring String
NoteThe 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 

feattostr/2

Formatfeattostr(+TYPE, -STRING)
Arguments
+TYPEfeature Feature name
-STRINGstring String
convert a feature to a string

inttostr/2

Formatinttostr(+INT, -STRING)
Arguments
+INTint Number
-STRINGstring String
Convert an integer into an string
> ?- inttostr(123, X).
 X: "123" 

strtoint/2

Formatstrtoint(+STRING, -INT)
Arguments
+STRINGstring String
-INTint Number
Convert a string into an integer
> ?- inttostr(123, X).
 X: "123" 

floattostr/2

Formatfloattostr(+FLOAT, -STRING)
Arguments
+FLOATfloat Float
-STRINGstring String
Convert a float into a string.
> ?- floattostr(1.23, X).
 X: "1.23000" 

strtofloat/2

Formatstrtofloat(+STRING, -FLOAT)
Arguments
+STRINGstring String
-FLOATfloat Float
Convert a float into a string.
> ?- strtofloat("1.23", X).
 X: 1.23000 

Top of this page Contents Index of this package LiLFeS Documents LiLFeS Home Page Tsujii laboratory

This document is automatically created by lildoc on Fri Sep 24 14:13:58 2004