Post
by UniTrader » Sat, 10. Sep 16, 15:33
i think this falls into unforseen limitations: me and Assailer need some more (standard) String Operations, best both for lua and AI/MD: (just Copied a lua syntax description from the Internet, should be obvoius how the AI/MD Syntax is meant; parameters in italics are optional, with their default as value)
LUA: strfind (str, substr, [init, [end]])
AI/MD: <get_position_of_substring result="$result" string="$string" substring="$substring" start="0" end="$string.length"/>
Receives two string arguments, and returns a number. This number indicates the first position where the second argument appears in the first argument. If the second argument is not a substring of the first one, then strfind returns nil . A third optional numerical argument specifies where to start the search. Another optional numerical argument specifies where to stop it.
LUA: strlen (s)
AI/MD: $string.length (as expression)
Receives a string and returns its length.
LUA: strsub (s, i, [j])
AI/MD: <get_substring_of_string result="$result" string="$string" start="0" length="$string.length" end="$string.length"
Returns another string, which is a substring of s , starting at i and runing until j . If j is absent, it is assumed to be equal to the length of s . Particularly, the call strsub(s,1,j) returns a prefix of s with length j , while the call strsub(s,i) returns a suffix of s , starting at i .
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help