![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(VB.NET) StringBuilder GetNthDemonstrates the GetNth method.
' The GetNth method is handy for getting parts from delimited strings. ' For example: Dim sb As New Chilkat.StringBuilder sb.Append("red,blue,""green,purple"",,yellow") Dim delimiterChar As String = "," Dim exceptDoubleQuoted As Boolean = True Dim exceptEscaped As Boolean = True ' Prints "[red]" Debug.WriteLine("[" & sb.GetNth(0,delimiterChar,exceptDoubleQuoted,exceptEscaped) & "]") ' Prints "[blue]" Debug.WriteLine("[" & sb.GetNth(1,delimiterChar,exceptDoubleQuoted,exceptEscaped) & "]") ' Prints "[green,purple]" Debug.WriteLine("[" & sb.GetNth(2,delimiterChar,exceptDoubleQuoted,exceptEscaped) & "]") ' Prints "[]" Debug.WriteLine("[" & sb.GetNth(3,delimiterChar,exceptDoubleQuoted,exceptEscaped) & "]") ' Prints "[yellow]" Debug.WriteLine("[" & sb.GetNth(4,delimiterChar,exceptDoubleQuoted,exceptEscaped) & "]") ' Prints "[]" Debug.WriteLine("[" & sb.GetNth(5,delimiterChar,exceptDoubleQuoted,exceptEscaped) & "]") |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.