![]() |
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
(DataFlex) StringTable SplitAndAppend ExampleDemonstrates the StringTable SplitAndAppend method.
Use ChilkatAx-win32.pkg Procedure Test Handle hoStrTab String s Boolean iSuccess Integer i Integer iNumStrings String sTemp1 Get Create (RefClass(cComChilkatStringTable)) To hoStrTab If (Not(IsComObjectCreated(hoStrTab))) Begin Send CreateComObject of hoStrTab End // SplitAndAppend make it easy to break apart comma delimited, semicolon delimited, // or strings delimited by other characters. Move 'abc,123,xyz,456,music,math,"World History","Chicago,Cubs",Japan' To s Get ComSplitAndAppend Of hoStrTab s "," True True To iSuccess Move 0 To i Get ComCount Of hoStrTab To iNumStrings While (i < iNumStrings) Get ComStringAt Of hoStrTab i To sTemp1 Showln i ": " sTemp1 Move (i + 1) To i Loop // The output is: // 0: abc // 1: 123 // 2: xyz // 3: 456 // 4: music // 5: math // 6: "World History" // 7: "Chicago,Cubs" // 8: Japan // Note: Keeping the quotes is intentional. End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.