str_len

BAP Online Manuals : Library Reference : Library by Name : str_len
Previous: str_int
Next: string

6.2.127. str_len

returns the length of a string

SYNOPSIS

str_len("Hello World",Len)

SYNTAX

str_len(String,Len) (i,o)

ARGUMENTS

string(string) (x) string to be evaluated
integer(Int) (x) length of string.

DESCRIPTION

Determines the length of String. Succeeds if the length could be matched with Len.

ERRORS

No runtime errors.

EXAMPLE

readln(String),
( str_len(String,Len), Len < 15, write(String),nl ;
  write("was too long."),nl
).

LAYERS

prolog-process, client-server, object

RELATED PREDICATES

frontstr


BAP Online Manuals : Library Reference : Library by Name : str_len
Previous: str_int
Next: string