LitDev Extension API

LD3DView LDArray LDBits LDBlueTooth LDCall
LDChart LDClient LDClipboard LDColours LDCommPort
LDController LDControls LDCursors LDDataBase LDDateTime
LDDebug LDDialogs LDDictionary LDEffect LDEmail
LDEncryption LDEvents LDFastArray LDFastShapes LDFigures
LDFile LDFocus LDftp LDGraph LDGraphicsWindow
LDHID LDImage LDInline LDIOWarrior LDList
LDLogic LDMath LDMathX LDMatrix LDMusic
LDNetwork LDPhysics LDProcess LDQueue LDRegex
LDResources LDScrollBars LDSearch LDServer LDSettings
LDShapes LDShell LDSort LDSound LDSpeech
LDStatistics LDStopwatch LDText LDTextWindow LDTimer
LDTranslate LDUnits LDUtilities LDWaveForm LDWebCam
LDWindows LDxml LDZip

LDText
Text manipulations.

Compare FindAll GetHeight
GetWidth Replace Split
Trim

Compare(text1,text2)
Lexically compare 2 text strings, the comparison is case insensitive and culture invariant.
text1 The first string to compare.
text2 The second string to compare.
returns An integer:
less than zero (text1 is less than text2)
zero (strings are equal)
greater than zero (text1 is greater than text2)


FindAll(text,find)
Get all occurances of a subtext in some text.
text The text to search.
find The subtext to search for.
returns An array with the positions of the start of each subtext or 0 for none.

GetHeight(text)
Get the height in pixels that text will be displayed in the GraphicsWindow with the current font.
The GraphicsWindow must be open to use this method.

text The text to get the height.
returns The width in pixels.

GetWidth(text)
Get the width in pixels that text will be displayed in the GraphicsWindow with the current font.
The GraphicsWindow must be open to use this method.

text The text to get the width.
returns The width in pixels.

Replace(text,find,replace)
Find and Replace all occurances of one text with another.
text A text to modify.
find The text to find and replace.
replace The text to replace the found text.
returns A modified copy of the input text.

Split(text,separator)
Split a variable into an array delimiated by a separator.
text A text string to split.
separator A separator string (e.g. " "), or an array of separator strings.
returns A result array of deliminated texts.

Trim(text)
Return a string with all leading and trailing 'white space' removed.
text A string to trim.
returns A trimmed copy of the input string.