SetStringMid , StringMid , String, Atom , ConcatStrings , LocalSymbols , PatchString .

String manipulation

SetStringMid Change a substring
StringMid Retrieve a substring
String, Atom Convert atom to string and vice versa
ConcatStrings Concatenate strings
LocalSymbols Create unique local symbols with given prefix
PatchString Execute commands between <? and ?> in string


SetStringMid -- Change a substring

Internal function
Calling Sequence:
SetStringMid(index,substring,string)
Parameters:
index - index of substring to get
substring - substring to store
string - string to store substring in.
Description:
Set (change) a part of a string. It leaves the original alone, returning a new changed copy.
Examples:
In> SetStringMid(3,"XY","abcdef")
Out> "abXYef";
See Also:
StringMid , Length .


StringMid -- Retrieve a substring

Internal function
Calling Sequence:
StringMid(index,length,string)
Parameters:
index - index of substring to get
length - length of substring to get
string - string to get substring from
Description:
StringMid returns a part of a string. Substrings can also be accessed using the [] operator.
Examples:
In> StringMid(3,2,"abcdef")
Out> "cd";
In> "abcdefg"[2 .. 4]
Out> "bcd";
See Also:
SetStringMid , Length .


String, Atom -- Convert atom to string and vice versa

Internal function
Calling Sequence:
Atom(string)
String(atom)
Parameters:
atom - an atom
string - a string
Description:
Atom(string) : Returns an atom with the string representation given as the evaluated argument. Example: "Atom("foo");" returns foo.

String is the inverse of Atom: turns atom into "atom".

Examples:
In> String(a)
Out> "a";
In> Atom("a")
Out> a;


ConcatStrings -- Concatenate strings

Internal function
Calling Sequence:
ConcatStrings(strings)
Parameters:
strings - one or more strings
Description:
ConcatStrings concatenates strings. Example: "ConcatStrings("a","b","c");" will return "abc".
Examples:
In> ConcatStrings("a","b","c")
Out> "abc";
See Also:
: .


LocalSymbols -- Create unique local symbols with given prefix

Standard math library
Calling Sequence:
LocalSymbols(...)body
Parameters:
... - list of symbols
body - expression to execute
Description:
Given the symbols passed as the first arguments to LocalSymbols a set of local symbols will be created, and creates unique ones for them, typically of the form $, where symbol was the symbol entered by the user, and number is a unique number. This scheme was used to such a generated symbol can not accientally be entered by a user.

This is useful in cases where a guaranteed free variable is needed, like in the macro-like functions (For, While, etc.).

Examples:
In> LocalSymbols(a,b)a+b
Out> $a6+ $b6;
See Also:
UniqueConstant .


PatchString -- Execute commands between <? and ?> in string

Internal function
Calling Sequence:
PatchString(string)
Parameters:
string - a string to patch
Description:
This function does the same as PatchLoad, but it works on a string in stead of on the contents of a text file. See PatchLoad for more details.
Examples:
In> PatchString("Two plus three is <? Write(2+3); ?> ");
Out> "Two plus three is 5 ";
See Also:
PatchLoad .