String Datum

by ExPixel
This is a useful little string datum I came up with.
ID:123408
 
Within the datum:

var/SaveStrings = TRUE

String
var
text = ""
max_length = null
list/filter
save_mode = TRUE
proc
New( new_text as text, new_max_length as num, list/new_filter, new_filter_mode as num )
Init( new_text as text, new_max_length as num, list/new_filter, new_filter_mode as num )
append(Append as text, Direction=BACK)
set_max_length(new_max_length)
insert(Insert as text, Place=text_length()+1)
set_filter_mode(NewMode = ILLEGAL)
filter()
replace(Replace as text, Replacement as text)
replaceEx(Replace as text, Replacement as text)
text_length()
get()
set_text(Newtext as text)
append_string(String/Append, Direction=BACK)
random_append(Characters=1, Direction=BACK, ascii_min=97, ascii_max=122)
String( new_text as text, new_max_length as num, list/new_filter, new_filter_mode as num )
from_file(var/f)
to_file(var/f, delete=FALSE)
disable_cache()
enable_cache()
terminate()
destroy()