diff options
author | Fate <fate-tmw@googlemail.com> | 2008-11-29 12:04:43 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-11-29 12:04:43 -0700 |
commit | 481c74df8cfd2b63376b29158cc8f3c5d11addef (patch) | |
tree | 916b8687484c6633a6e75e3953b4bf0ad23c9c79 /doc | |
parent | ee5ea021c66a6d8b011dd754ce620fd6b1cc60e1 (diff) | |
download | tmwa-481c74df8cfd2b63376b29158cc8f3c5d11addef.tar.gz tmwa-481c74df8cfd2b63376b29158cc8f3c5d11addef.tar.bz2 tmwa-481c74df8cfd2b63376b29158cc8f3c5d11addef.tar.xz tmwa-481c74df8cfd2b63376b29158cc8f3c5d11addef.zip |
Added SLang operations `is_exterior', `strstr', `substr', `contains_string', `strlen'
Diffstat (limited to 'doc')
-rw-r--r-- | doc/spell-language | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/spell-language b/doc/spell-language index 270f2f0..d5a798a 100644 --- a/doc/spell-language +++ b/doc/spell-language @@ -510,6 +510,25 @@ The following functions are available: + spell_index : spell -> int Determines a unique index assigned to each spell + + is_exterior : location -> bool + Determines whether the location is under an open sky + + + contains_string : string * string -> bool + contains_string(a, b) determines whether the string `a' contains + the string `b' as a substring. + + + strstr : string * string -> bool + strstr(a, b) returns the offset of the first instance of the + string `b' in the string `a', or fails if there is none. The + offset is reported with a base of zero, i.e., strstr("xyz", "x") = 0. + + + strlen : string -> int + Compute the length of a string, in characters. + + + substr : string * int * int -> string + substr(s, offset, len) extracts a substring of the length `len' at + offset `offset'. The substring is automatically clipped, i.e., the + function will never fail. Operations: ----------- |