Skip to content

TOMLKit

Description

A module for reading and writing TOML data.

Classes

Name
TKException
TKGenerator
TKInlineDictionary
TKLocalDateTime
TKLocalTime
TKParser

Properties

Name Type Read-Only
RxDateTimeString RegEx
RxLocalDateString RegEx
RxTimeString RegEx
Version XUISemanticVersion

Methods

Name Parameters Returns
GenerateTOML dict As Dictionary String
ParseTOML toml As String Dictionary
RegExMatchToDateTime match As RegExMatch DateTime
RegExMatchToLocalTime match As RegExMatch TKLocalTime

Constants

Name Type
kBillion Double
kByteBackslash Double
kByteBackspace Double
kByteCapA Double
kByteCapE Double
kByteCapF Double
kByteCapT Double
kByteCapU Double
kByteCapZ Double
kByteColon Double
kByteComma Double
kByteCurlyBraceClose Double
kByteCurlyBraceOpen Double
kByteDot Double
kByteEOL Double
kByteEquals Double
kByteFormFeed Double
kByteHash Double
kByteHyphen Double
kByteLineFeed Double
kByteLowA Double
kByteLowB Double
kByteLowE Double
kByteLowF Double
kByteLowI Double
kByteLowL Double
kByteLowN Double
kByteLowO Double
kByteLowR Double
kByteLowS Double
kByteLowT Double
kByteLowU Double
kByteLowX Double
kByteLowZ Double
kByteNine Double
kByteOne Double
kBytePlus Double
kByteQuoteDouble Double
kByteQuoteSingle Double
kByteReturn Double
kByteSeven Double
kByteSpace Double
kByteSquareBracketClose Double
kByteSquareBracketOpen Double
kByteTab Double
kByteUnderscore Double
kByteZero Double
kMillion Double
VERSION_MAJOR Double
VERSION_MINOR Double
VERSION_PATCH Double

kBillion As Double A billion.


kByteBackslash As Double The decimal ASCII value of the \ character.


kByteBackspace As Double The decimal ASCII value of the backspace character.


kByteCapA As Double The decimal ASCII value of the A character.


kByteCapE As Double The decimal ASCII value of the E character.


kByteCapF As Double The decimal ASCII value of the F character.


kByteCapT As Double The decimal ASCII value of the T character.


kByteCapU As Double The decimal ASCII value of the U character.


kByteCapZ As Double The decimal ASCII value of the Z character.


kByteColon As Double The decimal ASCII value of the : character.


kByteComma As Double The decimal ASCII value of the , character.


kByteCurlyBraceClose As Double The decimal ASCII value of the } character.


kByteCurlyBraceOpen As Double The decimal ASCII value of the { character.


kByteDot As Double The decimal ASCII value of the . character.


kByteEOL As Double The decimal ASCII value of the EOL character.


kByteEquals As Double The decimal ASCII value of the = character.


kByteFormFeed As Double The decimal ASCII value of the form feed character.


kByteHash As Double The decimal ASCII value of the # character.


kByteHyphen As Double The decimal ASCII value of the - character.


kByteLineFeed As Double The decimal ASCII value of the line feed character.


kByteLowA As Double The decimal ASCII value of the a character.


kByteLowB As Double The decimal ASCII value of the b character.


kByteLowE As Double The decimal ASCII value of the e character.


kByteLowF As Double The decimal ASCII value of the f character.


kByteLowI As Double The decimal ASCII value of the i character.


kByteLowL As Double The decimal ASCII value of the l character.


kByteLowN As Double The decimal ASCII value of the n character.


kByteLowO As Double The decimal ASCII value of the o character.


kByteLowR As Double The decimal ASCII value of the r character.


kByteLowS As Double The decimal ASCII value of the s character.


kByteLowT As Double The decimal ASCII value of the t character.


kByteLowU As Double The decimal ASCII value of the u character.


kByteLowX As Double The decimal ASCII value of the x character.


kByteLowZ As Double The decimal ASCII value of the z character.


kByteNine As Double The decimal ASCII value of the 9 character.


kByteOne As Double The decimal ASCII value of the 1 character.


kBytePlus As Double The decimal ASCII value of the + character.


kByteQuoteDouble As Double The decimal ASCII value of the " character.


kByteQuoteSingle As Double The decimal ASCII value of the ' character.


kByteReturn As Double The decimal ASCII value of the carriage return character.


kByteSeven As Double The decimal ASCII value of the 7 character.


kByteSpace As Double The decimal ASCII value of the character.


kByteSquareBracketClose As Double The decimal ASCII value of the ] character.


kByteSquareBracketOpen As Double The decimal ASCII value of the [ character.


kByteTab As Double The decimal ASCII value of the horizontal tab character.


kByteUnderscore As Double The decimal ASCII value of the _ character.


kByteZero As Double The decimal ASCII value of the 0 character.


kMillion As Double A million.


VERSION_MAJOR As Double The major version.


VERSION_MINOR As Double The minor version.


VERSION_PATCH As Double The patch version.


Property Descriptions

RxDateTimeString As RegEx

The regex for parsing a DateTime.


RxLocalDateString As RegEx

The regex for parsing a local date.


RxTimeString As RegEx

The regex for parsing time.


Version As XUISemanticVersion

The current version.


Method Descriptions

GenerateTOML(dict As Dictionary) As String

Converts a dictionary to a TOML document.


ParseTOML(toml As String) As Dictionary

Parses a TOML document into a dictionary and returns it.


RegExMatchToDateTime(match As RegExMatch) As DateTime

Converts a RegExMatch instance to a DateTime instance.


RegExMatchToLocalTime(match As RegExMatch) As TKLocalTime

Converts a RegExMatch instance to a TKLocalTime instance.


Acknowledgements

Ported from M_TOML, written by Kem Tekinay which can be found at:

https://github.com/ktekinay/Xojo-TOML

I have renamed and rewritten small parts to better fit with my preferred coding style but all credit is due to Kem.