A package to manage SymbolString handling throughout the program.
NaturalDocs:: | A package to manage SymbolString handling throughout the program. |
Functions | |
FromText | Extracts and returns a SymbolString from plain text. |
ToText | Converts a SymbolString to text, using the passed separator. |
ToBinaryFile | Writes a SymbolString to the passed filehandle. |
FromBinaryFile | Loads a SymbolString or undef from the filehandle and returns it. |
IdentifiersOf | Returns the SymbolString as an array of identifiers. |
Join | Takes a list of identifiers and/or SymbolStrings and returns it as a new SymbolString. |
sub FromText #( string textSymbol )
Extracts and returns a SymbolString from plain text.
This should be the only way to get a SymbolString from plain text, as the splitting and normalization must be consistent throughout the application.
sub ToText #( SymbolString symbolString, string separator )
Converts a SymbolString to text, using the passed separator.
sub ToBinaryFile #( FileHandle fileHandle, SymbolString symbol )
Writes a SymbolString to the passed filehandle. Can also encode an undef.
fileHandle | The filehandle to write to. |
symbol | The SymbolString to write, or undef. |
[UInt8: number of identifiers] [UString16: identifier] [UString16: identifier] ...
Undef is represented by a zero for the number of identifiers.
sub FromBinaryFile #( FileHandle fileHandle )
Loads a SymbolString or undef from the filehandle and returns it.
fileHandle | The filehandle to read from. |
The SymbolString or undef.
See ToBinaryFile() for format and dependencies.
sub IdentifiersOf #( SymbolString symbol )
Returns the SymbolString as an array of identifiers.
sub Join #( string/SymbolString identifier/symbol, string/SymolString identifier/symbol, ... )
Takes a list of identifiers and/or SymbolStrings and returns it as a new SymbolString.
Extracts and returns a SymbolString from plain text.
sub FromText #( string textSymbol )
Converts a SymbolString to text, using the passed separator.
sub ToText #( SymbolString symbolString, string separator )
Writes a SymbolString to the passed filehandle.
sub ToBinaryFile #( FileHandle fileHandle, SymbolString symbol )
Loads a SymbolString or undef from the filehandle and returns it.
sub FromBinaryFile #( FileHandle fileHandle )
Returns the SymbolString as an array of identifiers.
sub IdentifiersOf #( SymbolString symbol )
Takes a list of identifiers and/or SymbolStrings and returns it as a new SymbolString.
sub Join #( string/SymbolString identifier/symbol, string/SymolString identifier/symbol, ... )