AutoIt
AutoIt
StringBuilder GetNth
Demonstrates the GetNth method.Chilkat AutoIt Downloads
; The GetNth method is handy for getting parts from delimited strings.
; For example:
$oSb = ObjCreate("Chilkat.StringBuilder")
$oSb.Append("red,blue,""green,purple"",,yellow")
Local $sDelimiterChar = ","
Local $bExceptDoubleQuoted = True
Local $bExceptEscaped = True
; Prints "[red]"
ConsoleWrite("[" & $oSb.GetNth(0,$sDelimiterChar,$bExceptDoubleQuoted,$bExceptEscaped) & "]" & @CRLF)
; Prints "[blue]"
ConsoleWrite("[" & $oSb.GetNth(1,$sDelimiterChar,$bExceptDoubleQuoted,$bExceptEscaped) & "]" & @CRLF)
; Prints "[green,purple]"
ConsoleWrite("[" & $oSb.GetNth(2,$sDelimiterChar,$bExceptDoubleQuoted,$bExceptEscaped) & "]" & @CRLF)
; Prints "[]"
ConsoleWrite("[" & $oSb.GetNth(3,$sDelimiterChar,$bExceptDoubleQuoted,$bExceptEscaped) & "]" & @CRLF)
; Prints "[yellow]"
ConsoleWrite("[" & $oSb.GetNth(4,$sDelimiterChar,$bExceptDoubleQuoted,$bExceptEscaped) & "]" & @CRLF)
; Prints "[]"
ConsoleWrite("[" & $oSb.GetNth(5,$sDelimiterChar,$bExceptDoubleQuoted,$bExceptEscaped) & "]" & @CRLF)