home *** CD-ROM | disk | FTP | other *** search
/ BUG 11 / BUGCD1998_02.ISO / util / time2win / t2w32500.exe / _STRING.FRM < prev    next >
Text File  |  1997-12-25  |  116KB  |  3,659 lines

  1. VERSION 5.00
  2. Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
  3. Begin VB.Form frmString 
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "String"
  6.    ClientHeight    =   5235
  7.    ClientLeft      =   330
  8.    ClientTop       =   2385
  9.    ClientWidth     =   9765
  10.    MaxButton       =   0   'False
  11.    MDIChild        =   -1  'True
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   5235
  14.    ScaleWidth      =   9765
  15.    ShowInTaskbar   =   0   'False
  16.    Begin VB.TextBox txt_Result 
  17.       BackColor       =   &H00C0C0C0&
  18.       BorderStyle     =   0  'None
  19.       Height          =   4005
  20.       Left            =   105
  21.       Locked          =   -1  'True
  22.       MultiLine       =   -1  'True
  23.       ScrollBars      =   2  'Vertical
  24.       TabIndex        =   8
  25.       Top             =   630
  26.       Width           =   9555
  27.    End
  28.    Begin Threed.SSPanel SSPanel1 
  29.       Align           =   1  'Align Top
  30.       Height          =   480
  31.       Left            =   0
  32.       TabIndex        =   0
  33.       Top             =   0
  34.       Width           =   9765
  35.       _Version        =   65536
  36.       _ExtentX        =   17224
  37.       _ExtentY        =   847
  38.       _StockProps     =   15
  39.       ForeColor       =   -2147483640
  40.       BackColor       =   12632256
  41.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  42.          Name            =   "MS Sans Serif"
  43.          Size            =   8.25
  44.          Charset         =   0
  45.          Weight          =   400
  46.          Underline       =   0   'False
  47.          Italic          =   0   'False
  48.          Strikethrough   =   0   'False
  49.       EndProperty
  50.       Begin VB.ComboBox cmb_Function 
  51.          Height          =   315
  52.          Left            =   1365
  53.          TabIndex        =   1
  54.          Top             =   75
  55.          Width           =   7170
  56.       End
  57.       Begin Threed.SSCommand cmdNP 
  58.          Height          =   300
  59.          Index           =   1
  60.          Left            =   9435
  61.          TabIndex        =   10
  62.          Top             =   90
  63.          Width           =   255
  64.          _Version        =   65536
  65.          _ExtentX        =   450
  66.          _ExtentY        =   529
  67.          _StockProps     =   78
  68.          Caption         =   ">"
  69.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  70.             Name            =   "MS Sans Serif"
  71.             Size            =   8.25
  72.             Charset         =   0
  73.             Weight          =   400
  74.             Underline       =   0   'False
  75.             Italic          =   0   'False
  76.             Strikethrough   =   0   'False
  77.          EndProperty
  78.          BevelWidth      =   1
  79.          Font3D          =   3
  80.          RoundedCorners  =   0   'False
  81.          Outline         =   0   'False
  82.       End
  83.       Begin Threed.SSCommand cmdNP 
  84.          Height          =   300
  85.          Index           =   0
  86.          Left            =   8595
  87.          TabIndex        =   9
  88.          Top             =   90
  89.          Width           =   255
  90.          _Version        =   65536
  91.          _ExtentX        =   450
  92.          _ExtentY        =   529
  93.          _StockProps     =   78
  94.          Caption         =   "<"
  95.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  96.             Name            =   "MS Sans Serif"
  97.             Size            =   8.25
  98.             Charset         =   0
  99.             Weight          =   400
  100.             Underline       =   0   'False
  101.             Italic          =   0   'False
  102.             Strikethrough   =   0   'False
  103.          EndProperty
  104.          BevelWidth      =   1
  105.          Font3D          =   3
  106.          RoundedCorners  =   0   'False
  107.          Outline         =   0   'False
  108.       End
  109.       Begin Threed.SSCommand SSCommand1 
  110.          Default         =   -1  'True
  111.          Height          =   300
  112.          Left            =   8910
  113.          TabIndex        =   2
  114.          Top             =   90
  115.          Width           =   465
  116.          _Version        =   65536
  117.          _ExtentX        =   820
  118.          _ExtentY        =   529
  119.          _StockProps     =   78
  120.          Caption         =   "&Go"
  121.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  122.             Name            =   "MS Sans Serif"
  123.             Size            =   8.25
  124.             Charset         =   0
  125.             Weight          =   400
  126.             Underline       =   0   'False
  127.             Italic          =   0   'False
  128.             Strikethrough   =   0   'False
  129.          EndProperty
  130.          BevelWidth      =   1
  131.          RoundedCorners  =   0   'False
  132.          Outline         =   0   'False
  133.       End
  134.       Begin VB.Label Label2 
  135.          Caption         =   "&Select a function"
  136.          Height          =   255
  137.          Left            =   90
  138.          TabIndex        =   3
  139.          Top             =   120
  140.          Width           =   1275
  141.       End
  142.    End
  143.    Begin Threed.SSPanel SSPanel2 
  144.       Align           =   2  'Align Bottom
  145.       Height          =   465
  146.       Left            =   0
  147.       TabIndex        =   4
  148.       Top             =   4770
  149.       Width           =   9765
  150.       _Version        =   65536
  151.       _ExtentX        =   17224
  152.       _ExtentY        =   820
  153.       _StockProps     =   15
  154.       BackColor       =   12632256
  155.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  156.          Name            =   "MS Sans Serif"
  157.          Size            =   8.25
  158.          Charset         =   0
  159.          Weight          =   400
  160.          Underline       =   0   'False
  161.          Italic          =   0   'False
  162.          Strikethrough   =   0   'False
  163.       EndProperty
  164.       Begin VB.TextBox Text1 
  165.          Height          =   285
  166.          Left            =   1440
  167.          TabIndex        =   6
  168.          Tag             =   "A/BC/DEF/GHIJ/KLMNOP/"
  169.          Top             =   90
  170.          Width           =   7350
  171.       End
  172.       Begin Threed.SSCommand SSCommand2 
  173.          Height          =   285
  174.          Left            =   8865
  175.          TabIndex        =   7
  176.          Top             =   90
  177.          Width           =   825
  178.          _Version        =   65536
  179.          _ExtentX        =   1455
  180.          _ExtentY        =   503
  181.          _StockProps     =   78
  182.          Caption         =   "&Reset"
  183.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  184.             Name            =   "MS Sans Serif"
  185.             Size            =   8.25
  186.             Charset         =   0
  187.             Weight          =   400
  188.             Underline       =   0   'False
  189.             Italic          =   0   'False
  190.             Strikethrough   =   0   'False
  191.          EndProperty
  192.          BevelWidth      =   1
  193.          Outline         =   0   'False
  194.       End
  195.       Begin VB.Label Label1 
  196.          Caption         =   "&Enter a test string"
  197.          Height          =   255
  198.          Left            =   90
  199.          TabIndex        =   5
  200.          Top             =   120
  201.          Width           =   1275
  202.       End
  203.    End
  204. End
  205. Attribute VB_Name = "frmString"
  206. Attribute VB_GlobalNameSpace = False
  207. Attribute VB_Creatable = False
  208. Attribute VB_PredeclaredId = True
  209. Attribute VB_Exposed = False
  210. Option Explicit
  211. Option Base 1
  212.  
  213. Private Const Iteration = 250
  214.  
  215. Dim IsLoaded         As Integer
  216.  
  217. Dim TimerStartOk     As Integer
  218. Dim TimerCloseOk     As Integer
  219.  
  220. Dim TimerHandle      As Integer
  221. Dim TimerValue       As Long
  222.  
  223. Private Sub cmdNP_Click(Index As Integer)
  224.  
  225.    Call sub_NextPrev(cmb_Function, Index)
  226.  
  227. End Sub
  228.  
  229.  
  230. Private Sub cmb_Function_Click()
  231.    
  232.    If (IsLoaded = False) Then Exit Sub
  233.    
  234.    Call cDisableFI(mdiT2W.Picture1)
  235.    
  236.    SSPanel2.Visible = True
  237.    
  238.    txt_Result = ""
  239.    
  240.    DoEvents
  241.    
  242.    Select Case cmb_Function.ListIndex
  243.       Case 0
  244.          Call TestOneCharFromLeft
  245.       Case 1
  246.          Call TestOneCharFromRight
  247.       Case 2
  248.          Call TestBlockCharFromLeft
  249.       Case 3
  250.          Call TestBlockCharFromRight
  251.       Case 4
  252.          Call TestGetIn
  253.       Case 5
  254.          Call TestGetInR
  255.       Case 6
  256.          Call TestGetInPart
  257.       Case 7
  258.          Call TestGetInPartR
  259.       Case 8
  260.          Call TestGetBlock
  261.       Case 9
  262.          Call TestInsertChars
  263.       Case 10
  264.          Call TestInsertByMask
  265.       Case 11
  266.          Call TestInsertBlocks
  267.       Case 12
  268.          Call TestInsertBlocksBy
  269.       Case 13
  270.          Call TestRemoveOneChar
  271.       Case 14
  272.          Call TestRemoveBlockChar
  273.       Case 15
  274.          Call TestTokenIn
  275.       Case 16
  276.          SSPanel2.Visible = False
  277.          Call TestOrTokenX
  278.       Case 17
  279.          SSPanel2.Visible = False
  280.          Call TestAndTokenX
  281.       Case 18
  282.          Call TestReverse
  283.       Case 19
  284.          Call TestMixChars
  285.       Case 20
  286.          Call TestScrollX
  287.       Case 21
  288.          Call TestChangeChars
  289.       Case 22
  290.          Call TestChangeCharsUntil
  291.       Case 23
  292.          Call TestCheckChars
  293.       Case 24
  294.          Call TestFilterChars
  295.       Case 25
  296.          Call TestFilterNotChars
  297.       Case 26
  298.          Call TestFilterBlocks
  299.       Case 27
  300.          Call TestResizeString
  301.       Case 28
  302.          Call TestResizeStringAndFill
  303.       Case 29
  304.          Call TestCreateAndFill
  305.       Case 30
  306.          Call TestFill
  307.       Case 31
  308.          Call TestLrc
  309.       Case 32
  310.          Call TestCompress
  311.       Case 33
  312.          SSPanel2.Visible = False
  313.          Call TestCompressTab
  314.       Case 34
  315.          Call TestCompact
  316.       Case 35
  317.          Call TestAlign
  318.       Case 36
  319.          Call TestProperName
  320.       Case 37
  321.          Call TestProperName2
  322.       Case 38
  323.          Call TestStringSAR
  324.       Case 39
  325.          Call TestToHexa
  326.       Case 40
  327.          SSPanel2.Visible = False
  328.          Call TestRomanArabic
  329.       Case 41
  330.          Call TestAsciiEbcdic
  331.       Case 42
  332.          SSPanel2.Visible = False
  333.          Call TestPatternMatch
  334.       Case 43
  335.          SSPanel2.Visible = False
  336.          Call TestPatternExtMatch
  337.       Case 44
  338.          Call TestCheckNumericity
  339.       Case 45
  340.          Call TestAlphaDigit
  341.       Case 46
  342.          SSPanel2.Visible = False
  343.          Call TestH2X
  344.       Case 47
  345.          Call TestSortStr
  346.       Case 48
  347.          Call TestMorse
  348.       Case 49
  349.          Call TestToZ9
  350.       Case 50
  351.          Call TestDeleteSubString
  352.       Case 51
  353.          Call TestStringReplace
  354.       Case 52
  355.          Call TestLRFill
  356.       Case 53
  357.          Call TestLRSetIn
  358.       Case 54
  359.          Call TestMatchTable
  360.       Case 55
  361.          Call TestInStr
  362.       Case 56
  363.          Call TestExtract
  364.       Case 57
  365.          Call TestExtractIsolate
  366.    End Select
  367.  
  368.    DoEvents
  369.    Call cEnableFI(mdiT2W.Picture1)
  370.    
  371. End Sub
  372.  
  373. Private Sub Form_Activate()
  374.  
  375.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  376.  
  377. End Sub
  378.  
  379. Private Sub Form_Load()
  380.  
  381.    IsLoaded = False
  382.    
  383.    Show
  384.  
  385.    Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1)
  386.  
  387.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_string.t2w")
  388.    
  389.    IsLoaded = True
  390.    
  391. End Sub
  392.  
  393. Private Sub SSCommand1_Click()
  394.    
  395.    Call cmb_Function_Click
  396.    
  397. End Sub
  398.  
  399. Private Sub TestOneCharFromLeft()
  400.    
  401.    Dim intResult        As Integer
  402.    Dim strResult        As String
  403.    Dim strDisplay       As String
  404.    
  405.    Dim i                As Integer
  406.    
  407.    Dim Str1             As String
  408.    
  409.    intResult = 0
  410.    
  411.    strResult = ""
  412.    strDisplay = ""
  413.      
  414.    Str1 = Text1.Text
  415.    
  416.    strDisplay = strDisplay & "The 3,7,1,21,14 chars from left of '" & Str1 & "' are " & vbCrLf & vbCrLf
  417.  
  418.    strDisplay = strDisplay & "03: '" & cOneCharFromLeft(Str1, 3) & "'" & vbCrLf
  419.    strDisplay = strDisplay & "07: '" & cOneCharFromLeft(Str1, 7) & "'" & vbCrLf
  420.    strDisplay = strDisplay & "01: '" & cOneCharFromLeft(Str1, 1) & "'" & vbCrLf
  421.    strDisplay = strDisplay & "21: '" & cOneCharFromLeft(Str1, 21) & "'" & vbCrLf
  422.    strDisplay = strDisplay & "14: '" & cOneCharFromLeft(Str1, 14) & "'" & vbCrLf
  423.    
  424.    txt_Result = strDisplay
  425.  
  426.    'time the function
  427.  
  428.    TimerHandle = cTimerOpen()
  429.    TimerStartOk = cTimerStart(TimerHandle)
  430.    
  431.    For i = 1 To Iteration
  432.       strResult = cOneCharFromLeft(Str1, 3)
  433.    Next i
  434.    
  435.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  436.    
  437.    TimerCloseOk = cTimerClose(TimerHandle)
  438.  
  439. End Sub
  440.  
  441. Private Sub SSCommand2_Click()
  442.    
  443.    Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1)
  444.    
  445.    Call SSCommand1_Click
  446.    
  447. End Sub
  448.  
  449.  
  450.  
  451.  
  452.  
  453. Private Sub TestOneCharFromRight()
  454.    
  455.    Dim intResult        As Integer
  456.    Dim strResult        As String
  457.    Dim strDisplay       As String
  458.    
  459.    Dim i                As Integer
  460.    
  461.    Dim Str1             As String
  462.    
  463.    intResult = 0
  464.    
  465.    strResult = ""
  466.    strDisplay = ""
  467.      
  468.    Str1 = Text1.Text
  469.    
  470.    strDisplay = strDisplay & "The 3,7,1,21,14 chars from right of '" & Str1 & "' are " & vbCrLf & vbCrLf
  471.  
  472.    strDisplay = strDisplay & "03: '" & cOneCharFromRight(Str1, 3) & "'" & vbCrLf
  473.    strDisplay = strDisplay & "07: '" & cOneCharFromRight(Str1, 7) & "'" & vbCrLf
  474.    strDisplay = strDisplay & "01: '" & cOneCharFromRight(Str1, 1) & "'" & vbCrLf
  475.    strDisplay = strDisplay & "21: '" & cOneCharFromRight(Str1, 21) & "'" & vbCrLf
  476.    strDisplay = strDisplay & "14: '" & cOneCharFromRight(Str1, 14) & "'" & vbCrLf
  477.    
  478.    txt_Result = strDisplay
  479.  
  480.    'time the function
  481.  
  482.    TimerHandle = cTimerOpen()
  483.    TimerStartOk = cTimerStart(TimerHandle)
  484.    
  485.    For i = 1 To Iteration
  486.       strResult = cOneCharFromRight(Str1, 3)
  487.    Next i
  488.    
  489.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  490.    
  491.    TimerCloseOk = cTimerClose(TimerHandle)
  492.  
  493. End Sub
  494.  
  495. Private Sub TestBlockCharFromLeft()
  496.    
  497.    Dim intResult        As Integer
  498.    Dim strResult        As String
  499.    Dim strDisplay       As String
  500.    
  501.    Dim i                As Integer
  502.    
  503.    Dim Str1             As String
  504.    
  505.    intResult = 0
  506.    
  507.    strResult = ""
  508.    strDisplay = ""
  509.      
  510.    Str1 = Text1.Text
  511.    
  512.    strDisplay = strDisplay & "The 3,7,1,21,14 blocks from left of '" & Str1 & "' are " & vbCrLf & vbCrLf
  513.  
  514.    strDisplay = strDisplay & "03: '" & cBlockCharFromLeft(Str1, 3) & "'" & vbCrLf
  515.    strDisplay = strDisplay & "07: '" & cBlockCharFromLeft(Str1, 7) & "'" & vbCrLf
  516.    strDisplay = strDisplay & "01: '" & cBlockCharFromLeft(Str1, 1) & "'" & vbCrLf
  517.    strDisplay = strDisplay & "21: '" & cBlockCharFromLeft(Str1, 21) & "'" & vbCrLf
  518.    strDisplay = strDisplay & "14: '" & cBlockCharFromLeft(Str1, 14) & "'" & vbCrLf
  519.    
  520.    txt_Result = strDisplay
  521.  
  522.    'time the function
  523.  
  524.    TimerHandle = cTimerOpen()
  525.    TimerStartOk = cTimerStart(TimerHandle)
  526.    
  527.    For i = 1 To Iteration
  528.       strResult = cBlockCharFromLeft(Str1, 3)
  529.    Next i
  530.    
  531.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  532.    
  533.    TimerCloseOk = cTimerClose(TimerHandle)
  534.  
  535. End Sub
  536.  
  537. Private Sub TestBlockCharFromRight()
  538.    
  539.    Dim intResult        As Integer
  540.    Dim strResult        As String
  541.    Dim strDisplay       As String
  542.    
  543.    Dim i                As Integer
  544.    
  545.    Dim Str1             As String
  546.    
  547.    intResult = 0
  548.    
  549.    strResult = ""
  550.    strDisplay = ""
  551.      
  552.    Str1 = Text1.Text
  553.    
  554.    strDisplay = strDisplay & "The 3,7,1,21,14 blocks from right of '" & Str1 & "' are " & vbCrLf & vbCrLf
  555.  
  556.    strDisplay = strDisplay & "03: '" & cBlockCharFromRight(Str1, 3) & "'" & vbCrLf
  557.    strDisplay = strDisplay & "07: '" & cBlockCharFromRight(Str1, 7) & "'" & vbCrLf
  558.    strDisplay = strDisplay & "01: '" & cBlockCharFromRight(Str1, 1) & "'" & vbCrLf
  559.    strDisplay = strDisplay & "21: '" & cBlockCharFromRight(Str1, 21) & "'" & vbCrLf
  560.    strDisplay = strDisplay & "14: '" & cBlockCharFromRight(Str1, 14) & "'" & vbCrLf
  561.    
  562.    txt_Result = strDisplay
  563.  
  564.    'time the function
  565.  
  566.    TimerHandle = cTimerOpen()
  567.    TimerStartOk = cTimerStart(TimerHandle)
  568.    
  569.    For i = 1 To Iteration
  570.       strResult = cBlockCharFromRight(Str1, 3)
  571.    Next i
  572.    
  573.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  574.    
  575.    TimerCloseOk = cTimerClose(TimerHandle)
  576.  
  577. End Sub
  578.  
  579. Private Sub TestGetIn()
  580.    
  581.    Dim intResult        As Integer
  582.    Dim strResult        As String
  583.    Dim strDisplay       As String
  584.    
  585.    Dim i                As Integer
  586.    
  587.    Dim Str1             As String
  588.    Dim Sep1             As String
  589.    
  590.    intResult = 0
  591.    
  592.    strResult = ""
  593.    strDisplay = ""
  594.      
  595.    Str1 = Text1.Text
  596.    
  597.    Sep1 = "/"
  598.    
  599.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  600.  
  601.    strDisplay = strDisplay & "3: '" & cGetIn(Str1, Sep1, 3) & "'" & vbCrLf
  602.    strDisplay = strDisplay & "7: '" & cGetIn(Str1, Sep1, 7) & "'" & vbCrLf
  603.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf
  604.    strDisplay = strDisplay & "5: '" & cGetIn(Str1, Sep1, 5) & "'" & vbCrLf
  605.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf
  606.    strDisplay = strDisplay & "0: '" & cGetIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  607.    
  608.    Sep1 = "G"
  609.    
  610.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  611.  
  612.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf
  613.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  614.    
  615.    Sep1 = "g"
  616.    
  617.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  618.  
  619.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf
  620.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'"
  621.    
  622.    txt_Result = strDisplay
  623.  
  624.    'time the function
  625.  
  626.    TimerHandle = cTimerOpen()
  627.    TimerStartOk = cTimerStart(TimerHandle)
  628.    
  629.    For i = 1 To Iteration
  630.       strResult = cGetIn(Str1, "/", 3)
  631.    Next i
  632.    
  633.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  634.    
  635.    TimerCloseOk = cTimerClose(TimerHandle)
  636.  
  637. End Sub
  638.  
  639. Private Sub TestGetInR()
  640.    
  641.    Dim intResult        As Integer
  642.    Dim strResult        As String
  643.    Dim strDisplay       As String
  644.    
  645.    Dim i                As Integer
  646.    
  647.    Dim Str1             As String
  648.    Dim Sep1             As String
  649.    
  650.    intResult = 0
  651.    
  652.    strResult = ""
  653.    strDisplay = ""
  654.      
  655.    Str1 = Text1.Text
  656.    
  657.    Sep1 = "/"
  658.    
  659.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  660.  
  661.    strDisplay = strDisplay & "3: '" & cGetInR(Str1, Sep1, 3) & "'" & vbCrLf
  662.    strDisplay = strDisplay & "7: '" & cGetInR(Str1, Sep1, 7) & "'" & vbCrLf
  663.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf
  664.    strDisplay = strDisplay & "5: '" & cGetInR(Str1, Sep1, 5) & "'" & vbCrLf
  665.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf
  666.    strDisplay = strDisplay & "0: '" & cGetInR(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  667.    
  668.    Sep1 = "G"
  669.    
  670.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  671.  
  672.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf
  673.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  674.    
  675.    Sep1 = "g"
  676.    
  677.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  678.  
  679.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf
  680.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'"
  681.    
  682.    txt_Result = strDisplay
  683.  
  684.    'time the function
  685.  
  686.    TimerHandle = cTimerOpen()
  687.    TimerStartOk = cTimerStart(TimerHandle)
  688.    
  689.    For i = 1 To Iteration
  690.       strResult = cGetInR(Str1, Sep1, 3)
  691.    Next i
  692.    
  693.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  694.    
  695.    TimerCloseOk = cTimerClose(TimerHandle)
  696.  
  697. End Sub
  698.  
  699. Private Sub TestGetInPart()
  700.    
  701.    Dim intResult        As Integer
  702.    Dim strResult        As String
  703.    Dim strDisplay       As String
  704.    
  705.    Dim i                As Integer
  706.    
  707.    Dim Str1             As String
  708.    Dim Sep1             As String
  709.    
  710.    intResult = 0
  711.    
  712.    strResult = ""
  713.    strDisplay = ""
  714.      
  715.    Str1 = Text1.Text
  716.    
  717.    Sep1 = "/"
  718.    
  719.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  720.  
  721.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  722.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  723.    
  724.    Sep1 = "G"
  725.    
  726.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  727.  
  728.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  729.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  730.    
  731.    Sep1 = "g"
  732.    
  733.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  734.  
  735.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  736.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'"
  737.    
  738.    txt_Result = strDisplay
  739.  
  740.    'time the function
  741.  
  742.    TimerHandle = cTimerOpen()
  743.    TimerStartOk = cTimerStart(TimerHandle)
  744.    
  745.    For i = 1 To Iteration
  746.       strResult = cGetInPart(Str1, Sep1, True)
  747.    Next i
  748.    
  749.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  750.    
  751.    TimerCloseOk = cTimerClose(TimerHandle)
  752.  
  753. End Sub
  754.  
  755. Private Sub TestGetInPartR()
  756.    
  757.    Dim intResult        As Integer
  758.    Dim strResult        As String
  759.    Dim strDisplay       As String
  760.    
  761.    Dim i                As Integer
  762.    
  763.    Dim Str1             As String
  764.    Dim Sep1             As String
  765.    
  766.    intResult = 0
  767.    
  768.    strResult = ""
  769.    strDisplay = ""
  770.      
  771.    Str1 = Text1.Text
  772.    
  773.    Sep1 = "/"
  774.    
  775.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  776.  
  777.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  778.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  779.    
  780.    Sep1 = "G"
  781.    
  782.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  783.  
  784.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  785.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  786.    
  787.    Sep1 = "g"
  788.    
  789.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  790.  
  791.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  792.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'"
  793.    
  794.    txt_Result = strDisplay
  795.  
  796.    'time the function
  797.  
  798.    TimerHandle = cTimerOpen()
  799.    TimerStartOk = cTimerStart(TimerHandle)
  800.    
  801.    For i = 1 To Iteration
  802.       strResult = cGetInPartR(Str1, Sep1, True)
  803.    Next i
  804.    
  805.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  806.    
  807.    TimerCloseOk = cTimerClose(TimerHandle)
  808.  
  809. End Sub
  810.  
  811. Private Sub TestGetBlock()
  812.    
  813.    Dim intResult        As Integer
  814.    Dim strResult        As String
  815.    Dim strDisplay       As String
  816.    
  817.    Dim i                As Integer
  818.    
  819.    Dim Str1             As String
  820.    Dim BlockSize        As Integer
  821.    
  822.    intResult = 0
  823.    
  824.    strResult = ""
  825.    strDisplay = ""
  826.      
  827.    Str1 = Text1.Text
  828.    
  829.    BlockSize = 2
  830.    
  831.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  832.  
  833.    strDisplay = strDisplay & "3: '" & cGetBlock(Str1, 3, BlockSize) & "'" & vbCrLf
  834.    strDisplay = strDisplay & "7: '" & cGetBlock(Str1, 7, BlockSize) & "'" & vbCrLf
  835.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf
  836.    strDisplay = strDisplay & "5: '" & cGetBlock(Str1, 5, BlockSize) & "'" & vbCrLf
  837.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf
  838.    strDisplay = strDisplay & "0: '" & cGetBlock(Str1, 0, BlockSize) & "'" & vbCrLf & vbCrLf
  839.    
  840.    BlockSize = 3
  841.    
  842.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  843.  
  844.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf
  845.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf & vbCrLf
  846.    
  847.    BlockSize = 4
  848.    
  849.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  850.  
  851.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf
  852.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'"
  853.    
  854.    txt_Result = strDisplay
  855.  
  856.    'time the function
  857.  
  858.    TimerHandle = cTimerOpen()
  859.    TimerStartOk = cTimerStart(TimerHandle)
  860.    
  861.    For i = 1 To Iteration
  862.       strResult = cGetBlock(Str1, BlockSize, 3)
  863.    Next i
  864.    
  865.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  866.    
  867.    TimerCloseOk = cTimerClose(TimerHandle)
  868.  
  869. End Sub
  870.  
  871. Private Sub TestInsertChars()
  872.    
  873.    Dim intResult        As Integer
  874.    Dim strResult        As String
  875.    Dim strDisplay       As String
  876.    
  877.    Dim i                As Integer
  878.    
  879.    Dim Str1             As String
  880.   
  881.    intResult = 0
  882.    
  883.    strResult = ""
  884.    strDisplay = ""
  885.      
  886.    Str1 = Text1.Text
  887.    
  888.    strDisplay = strDisplay & "Insert 'a' from 7 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  889.    strDisplay = strDisplay & cInsertChars(Str1, 7, "a") & vbCrLf & vbCrLf
  890.  
  891.    strDisplay = strDisplay & "Insert '10$' from 2 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  892.    strDisplay = strDisplay & cInsertChars(Str1, 2, "10$") & vbCrLf & vbCrLf
  893.  
  894.    strDisplay = strDisplay & "Insert '@' from 21 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  895.    strDisplay = strDisplay & cInsertChars(Str1, 21, "@") & vbCrLf & vbCrLf
  896.  
  897.    txt_Result = strDisplay
  898.  
  899.    'time the function
  900.  
  901.    TimerHandle = cTimerOpen()
  902.    TimerStartOk = cTimerStart(TimerHandle)
  903.    
  904.    For i = 1 To Iteration
  905.       strResult = cInsertChars(Str1, 1, "a")
  906.    Next i
  907.    
  908.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  909.    
  910.    TimerCloseOk = cTimerClose(TimerHandle)
  911.  
  912. End Sub
  913.  
  914. Private Sub TestInsertByMask()
  915.    
  916.    Dim intResult        As Integer
  917.    Dim strResult        As String
  918.    Dim strDisplay       As String
  919.    
  920.    Dim i                As Integer
  921.    
  922.    Dim Str1             As String
  923.    Dim Str2             As String
  924.    Dim Mask1            As String
  925.   
  926.    intResult = 0
  927.    
  928.    strResult = ""
  929.    strDisplay = ""
  930.      
  931.    Str1 = "Nr ## Price $###.##"
  932.    Str2 = "0705200"
  933.    Mask1 = "#"
  934.    
  935.    strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  936.    strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf
  937.  
  938.    Str1 = Text1.Text
  939.    Str2 = String(cCount(Str1, "/"), "*")
  940.    Mask1 = "/"
  941.    
  942.    strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  943.    strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf
  944.  
  945.    txt_Result = strDisplay
  946.  
  947.    'time the function
  948.  
  949.    TimerHandle = cTimerOpen()
  950.    TimerStartOk = cTimerStart(TimerHandle)
  951.    
  952.    For i = 1 To Iteration
  953.       strResult = cInsertByMask(Str1, Mask1, Str2)
  954.    Next i
  955.    
  956.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  957.    
  958.    TimerCloseOk = cTimerClose(TimerHandle)
  959.  
  960. End Sub
  961.  
  962. Private Sub TestInsertBlocks()
  963.    
  964.    Dim intResult        As Integer
  965.    Dim strResult        As String
  966.    Dim strDisplay       As String
  967.    
  968.    Dim i                As Integer
  969.    
  970.    Dim Str1             As String
  971.    Dim Str2             As String
  972.   
  973.    intResult = 0
  974.    
  975.    strResult = ""
  976.    strDisplay = ""
  977.      
  978.    Str1 = "A~BC~DEF~GHIJ~"
  979.    Str2 = "a~bc~def~ghij"
  980.    
  981.    strDisplay = strDisplay + "Insert (InsertBlocks) '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  982.    strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf
  983.  
  984.    Str1 = "A~BC~DEF~GHIJ~"
  985.    Str2 = ""
  986.    
  987.    strDisplay = strDisplay + "Insert (InsertBlocks) '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  988.    strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf
  989.  
  990.    Str1 = "A~BC~DEF~GHIJ~"
  991.    Str2 = ""
  992.    
  993.    strDisplay = strDisplay + "Insert (InsertBlocksExt) '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  994.    strDisplay = strDisplay & cInsertBlocksExt(Str1, Str2) & vbCrLf & vbCrLf
  995.  
  996.    txt_Result = strDisplay
  997.  
  998.    'time the function
  999.  
  1000.    TimerHandle = cTimerOpen()
  1001.    TimerStartOk = cTimerStart(TimerHandle)
  1002.    
  1003.    For i = 1 To Iteration
  1004.       strResult = cInsertBlocks(Str1, Str2)
  1005.    Next i
  1006.    
  1007.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1008.    
  1009.    TimerCloseOk = cTimerClose(TimerHandle)
  1010.  
  1011. End Sub
  1012.  
  1013. Public Sub TestInsertBlocksBy()
  1014.    
  1015.    Dim intResult        As Integer
  1016.    Dim strResult        As String
  1017.    Dim strDisplay       As String
  1018.    
  1019.    Dim i                As Integer
  1020.    
  1021.    Dim Str1             As String
  1022.    Dim Str2             As String
  1023.    Dim Sep1             As String
  1024.   
  1025.    intResult = 0
  1026.    
  1027.    strResult = ""
  1028.    strDisplay = ""
  1029.      
  1030.    Str1 = Text1.Text
  1031.    Str2 = "a/bc/def/ghij"
  1032.    Sep1 = "/"
  1033.    
  1034.    strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  1035.    strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf
  1036.  
  1037.    Str1 = Text1.Text
  1038.    Str2 = ""
  1039.    
  1040.    strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  1041.    strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf
  1042.  
  1043.    txt_Result = strDisplay
  1044.  
  1045.    'time the function
  1046.  
  1047.    TimerHandle = cTimerOpen()
  1048.    TimerStartOk = cTimerStart(TimerHandle)
  1049.    
  1050.    For i = 1 To Iteration
  1051.       strResult = cInsertBlocksBy(Str1, Str2, Sep1)
  1052.    Next i
  1053.    
  1054.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1055.    
  1056.    TimerCloseOk = cTimerClose(TimerHandle)
  1057.  
  1058. End Sub
  1059.  
  1060. Private Sub TestRemoveOneChar()
  1061.    
  1062.    Dim intResult        As Integer
  1063.    Dim strResult        As String
  1064.    Dim strDisplay       As String
  1065.    
  1066.    Dim i                As Integer
  1067.    
  1068.    Dim Str1             As String
  1069.    
  1070.    intResult = 0
  1071.    
  1072.    strResult = ""
  1073.    strDisplay = ""
  1074.      
  1075.    Str1 = Text1.Text
  1076.    strDisplay = strDisplay & "Removing the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1077.    strDisplay = strDisplay & cRemoveOneChar(Str1, 7) & vbCrLf & vbCrLf
  1078.    
  1079.    Str1 = Text1.Text
  1080.    strDisplay = strDisplay & "Removing the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1081.    strDisplay = strDisplay & cRemoveOneChar(Str1, 21) & vbCrLf & vbCrLf
  1082.    
  1083.    Str1 = Text1.Text
  1084.    strDisplay = strDisplay & "Removing the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1085.    strDisplay = strDisplay & cRemoveOneChar(Str1, 14) & vbCrLf & vbCrLf
  1086.    
  1087.    Str1 = Text1.Text
  1088.    strDisplay = strDisplay & "Removing the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1089.    strDisplay = strDisplay & cRemoveOneChar(Str1, 0) & vbCrLf & vbCrLf
  1090.    
  1091.    Str1 = Text1.Text
  1092.    strDisplay = strDisplay & "Removing the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1093.    strDisplay = strDisplay & cRemoveOneChar(Str1, 1)
  1094.    
  1095.    txt_Result = strDisplay
  1096.  
  1097.    'time the function
  1098.  
  1099.    Str1 = Text1.Text
  1100.    
  1101.    TimerHandle = cTimerOpen()
  1102.    TimerStartOk = cTimerStart(TimerHandle)
  1103.    
  1104.    For i = 1 To Iteration
  1105.       strResult = cRemoveOneChar(Str1, 7)
  1106.    Next i
  1107.    
  1108.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1109.    
  1110.    TimerCloseOk = cTimerClose(TimerHandle)
  1111.  
  1112. End Sub
  1113.  
  1114. Public Sub TestRemoveBlockChar()
  1115.    
  1116.    Dim intResult        As Integer
  1117.    Dim strResult        As String
  1118.    Dim strDisplay       As String
  1119.    
  1120.    Dim i                As Integer
  1121.    
  1122.    Dim Str1             As String
  1123.    
  1124.    intResult = 0
  1125.    
  1126.    strResult = ""
  1127.    strDisplay = ""
  1128.      
  1129.    Str1 = Text1.Text
  1130.    strDisplay = strDisplay & "Removing 3 chars from the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1131.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 7, 3) & vbCrLf & vbCrLf
  1132.    
  1133.    Str1 = Text1.Text
  1134.    strDisplay = strDisplay & "Removing 2 chars from the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1135.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 21, 2) & vbCrLf & vbCrLf
  1136.    
  1137.    Str1 = Text1.Text
  1138.    strDisplay = strDisplay & "Removing 7 chars from the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1139.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 14, 7) & vbCrLf & vbCrLf
  1140.    
  1141.    Str1 = Text1.Text
  1142.    strDisplay = strDisplay & "Removing 14 chars from the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1143.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 0, 14) & vbCrLf & vbCrLf
  1144.    
  1145.    Str1 = Text1.Text
  1146.    strDisplay = strDisplay & "Removing 50 chars from the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1147.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 1, 50)
  1148.    
  1149.    txt_Result = strDisplay
  1150.  
  1151.    'time the function
  1152.  
  1153.    Str1 = Text1.Text
  1154.  
  1155.    TimerHandle = cTimerOpen()
  1156.    TimerStartOk = cTimerStart(TimerHandle)
  1157.    
  1158.    For i = 1 To Iteration
  1159.       strResult = cRemoveBlockChar(Str1, 1, 1)
  1160.    Next i
  1161.    
  1162.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1163.    
  1164.    TimerCloseOk = cTimerClose(TimerHandle)
  1165.  
  1166. End Sub
  1167.  
  1168. Private Sub TestTokenIn()
  1169.    
  1170.    Dim intResult        As Integer
  1171.    Dim strResult        As String
  1172.    Dim strDisplay       As String
  1173.    
  1174.    Dim i                As Integer
  1175.    
  1176.    Dim Str1             As String
  1177.    Dim Sep1             As String
  1178.    
  1179.    intResult = 0
  1180.    
  1181.    strResult = ""
  1182.    strDisplay = ""
  1183.      
  1184.    Str1 = Text1.Text
  1185.    
  1186.    Sep1 = "/HM"
  1187.    
  1188.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  1189.  
  1190.    strDisplay = strDisplay & "3: '" & cTokenIn(Str1, Sep1, 3) & "'" & vbCrLf
  1191.    strDisplay = strDisplay & "7: '" & cTokenIn(Str1, Sep1, 7) & "'" & vbCrLf
  1192.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf
  1193.    strDisplay = strDisplay & "5: '" & cTokenIn(Str1, Sep1, 5) & "'" & vbCrLf
  1194.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf
  1195.    strDisplay = strDisplay & "0: '" & cTokenIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  1196.    
  1197.    Sep1 = "G"
  1198.    
  1199.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  1200.  
  1201.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf
  1202.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  1203.    
  1204.    Sep1 = "g"
  1205.    
  1206.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  1207.  
  1208.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf
  1209.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'"
  1210.    
  1211.    txt_Result = strDisplay
  1212.  
  1213.    'time the function
  1214.  
  1215.    TimerHandle = cTimerOpen()
  1216.    TimerStartOk = cTimerStart(TimerHandle)
  1217.    
  1218.    For i = 1 To Iteration
  1219.       strResult = cTokenIn(Str1, Sep1, 3)
  1220.    Next i
  1221.    
  1222.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1223.    
  1224.    TimerCloseOk = cTimerClose(TimerHandle)
  1225.  
  1226. End Sub
  1227.  
  1228. Private Sub TestOrTokenX()
  1229.    
  1230.    Dim intResult        As Integer
  1231.    Dim strResult        As String
  1232.    Dim strDisplay       As String
  1233.    
  1234.    Dim i                As Integer
  1235.    
  1236.    Dim Str1             As String
  1237.    Dim Str2             As String
  1238.    Dim Sep1             As String
  1239.    
  1240.    intResult = 0
  1241.    
  1242.    strResult = ""
  1243.    strDisplay = ""
  1244.    
  1245.    Sep1 = "\"
  1246.      
  1247.    Str1 = "FOX|OVER|THE"
  1248.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1249.    strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  1250.    
  1251.    Str1 = "quick|jumps|the"
  1252.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1253.    strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  1254.  
  1255.    Str1 = "FOX\OVER\THE"
  1256.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1257.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1258.    
  1259.    Str1 = "quick\jumps\the"
  1260.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1261.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1262.  
  1263.    Str1 = "FOX/OVER/THE"
  1264.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1265.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1266.    
  1267.    Str1 = "quick\JUMPS\the"
  1268.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1269.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1270.  
  1271.    Str1 = LCase$("quick\jumps\THE")
  1272.    Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
  1273.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1274.    
  1275.    txt_Result = strDisplay
  1276.  
  1277.    'time the function
  1278.  
  1279.    TimerHandle = cTimerOpen()
  1280.    TimerStartOk = cTimerStart(TimerHandle)
  1281.    
  1282.    For i = 1 To Iteration
  1283.       strResult = cOrTokenIn(Str2, Str1, Sep1)
  1284.    Next i
  1285.    
  1286.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1287.    
  1288.    TimerCloseOk = cTimerClose(TimerHandle)
  1289.  
  1290. End Sub
  1291.  
  1292. Private Sub TestAndTokenX()
  1293.    
  1294.    Dim intResult        As Integer
  1295.    Dim strResult        As String
  1296.    Dim strDisplay       As String
  1297.    
  1298.    Dim i                As Integer
  1299.    
  1300.    Dim Str1             As String
  1301.    Dim Str2             As String
  1302.    Dim Sep1             As String
  1303.    
  1304.    intResult = 0
  1305.    
  1306.    strResult = ""
  1307.    strDisplay = ""
  1308.      
  1309.    Sep1 = "\"
  1310.      
  1311.    Str1 = "FOX|OVER|THE"
  1312.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1313.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  1314.    
  1315.    Str1 = "quick|jumps|the"
  1316.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1317.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  1318.  
  1319.    Str1 = "FOX\OVER\THE"
  1320.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1321.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1322.    
  1323.    Str1 = "quick\jumps\the"
  1324.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1325.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1326.  
  1327.    Str1 = "FOX/OVER/THE"
  1328.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1329.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1330.    
  1331.    Str1 = "quick\JUMPS\the"
  1332.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1333.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1334.  
  1335.    Str1 = LCase$("quick\jumps\THE")
  1336.    Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
  1337.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1338.    
  1339.    txt_Result = strDisplay
  1340.  
  1341.    'time the function
  1342.  
  1343.    TimerHandle = cTimerOpen()
  1344.    TimerStartOk = cTimerStart(TimerHandle)
  1345.    
  1346.    For i = 1 To Iteration
  1347.       strResult = cOrTokenIn(Str2, Str1, Sep1)
  1348.    Next i
  1349.    
  1350.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1351.    
  1352.    TimerCloseOk = cTimerClose(TimerHandle)
  1353.  
  1354. End Sub
  1355.  
  1356. Private Sub TestReverse()
  1357.    
  1358.    Dim intResult        As Integer
  1359.    Dim strResult        As String
  1360.    Dim strDisplay       As String
  1361.    
  1362.    Dim i                As Integer
  1363.    
  1364.    Dim Str1             As String
  1365.    Dim Str2             As String
  1366.    
  1367.    intResult = 0
  1368.    
  1369.    strResult = ""
  1370.    strDisplay = ""
  1371.      
  1372.    Str1 = Text1.Text
  1373.    Str2 = cReverse(Str1)
  1374.    
  1375.    strDisplay = strDisplay & "Reverse of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1376.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1377.    
  1378.    strDisplay = strDisplay & "Reverse of '" & Str2 & "' is " & vbCrLf & vbCrLf
  1379.    strDisplay = strDisplay & cReverse(Str2) & vbCrLf & vbCrLf
  1380.    
  1381.    txt_Result = strDisplay
  1382.  
  1383.    'time the function
  1384.  
  1385.    TimerHandle = cTimerOpen()
  1386.    TimerStartOk = cTimerStart(TimerHandle)
  1387.    
  1388.    For i = 1 To Iteration
  1389.       strResult = cReverse(Str1)
  1390.    Next i
  1391.    
  1392.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1393.    
  1394.    TimerCloseOk = cTimerClose(TimerHandle)
  1395.  
  1396. End Sub
  1397.  
  1398. Private Sub TestMixChars()
  1399.    
  1400.    Dim intResult        As Integer
  1401.    Dim strResult        As String
  1402.    Dim strDisplay       As String
  1403.    
  1404.    Dim i                As Integer
  1405.    
  1406.    Dim Str1             As String
  1407.    Dim Str2             As String
  1408.    
  1409.    intResult = 0
  1410.    
  1411.    strResult = ""
  1412.    strDisplay = ""
  1413.      
  1414.    Str1 = Text1.Text
  1415.    Str2 = cMixChars(Str1)
  1416.    
  1417.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1418.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1419.    
  1420.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  1421.    strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf
  1422.    
  1423.    Str1 = "TIME TO WIN (32-Bit)"
  1424.    Str2 = cMixChars(Str1)
  1425.    
  1426.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1427.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1428.    
  1429.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  1430.    strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf
  1431.    
  1432.    Str1 = "Under the sky, the sun lights"
  1433.    Str2 = cMixChars(Str1)
  1434.    
  1435.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1436.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1437.    
  1438.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  1439.    strDisplay = strDisplay & cMixChars(Str2)
  1440.    
  1441.    txt_Result = strDisplay
  1442.  
  1443.    'time the function
  1444.  
  1445.    TimerHandle = cTimerOpen()
  1446.    TimerStartOk = cTimerStart(TimerHandle)
  1447.    
  1448.    For i = 1 To Iteration
  1449.       strResult = cMixChars(Str1)
  1450.    Next i
  1451.    
  1452.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1453.    
  1454.    TimerCloseOk = cTimerClose(TimerHandle)
  1455.  
  1456. End Sub
  1457.  
  1458. Private Sub TestScrollX()
  1459.    
  1460.    Dim intResult        As Integer
  1461.    Dim strResult        As String
  1462.    Dim strDisplay       As String
  1463.    
  1464.    Dim i                As Integer
  1465.    
  1466.    Dim Str1             As String
  1467.    Dim Str2             As String
  1468.    
  1469.    intResult = 0
  1470.    
  1471.    strResult = ""
  1472.    strDisplay = ""
  1473.      
  1474.    Str1 = Text1.Text
  1475.    Str2 = Text1.Text
  1476.    
  1477.    strDisplay = strDisplay & "Scroll 7 times from left into '" & Str1 & "' is " & vbCrLf & vbCrLf
  1478.    
  1479.    For i = 1 To 7
  1480.       Str2 = cScrollL(Str2)
  1481.       strDisplay = strDisplay & Str2 & vbCrLf
  1482.    Next i
  1483.    
  1484.    strDisplay = strDisplay & vbCrLf
  1485.    
  1486.    Str1 = Text1.Text
  1487.    Str2 = Text1.Text
  1488.    
  1489.    strDisplay = strDisplay & "Scroll 7 times from right into '" & Str1 & "' is " & vbCrLf & vbCrLf
  1490.    
  1491.    For i = 1 To 7
  1492.       Str2 = cScrollR(Str2)
  1493.       strDisplay = strDisplay & Str2 & vbCrLf
  1494.    Next i
  1495.    
  1496.    strDisplay = strDisplay & vbCrLf
  1497.    
  1498.    txt_Result = strDisplay
  1499.  
  1500.    'time the function
  1501.  
  1502.    TimerHandle = cTimerOpen()
  1503.    TimerStartOk = cTimerStart(TimerHandle)
  1504.    
  1505.    For i = 1 To Iteration
  1506.       strResult = cScrollL(Str1)
  1507.    Next i
  1508.    
  1509.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1510.    
  1511.    TimerCloseOk = cTimerClose(TimerHandle)
  1512.  
  1513. End Sub
  1514.  
  1515. Private Sub TestChangeChars()
  1516.    
  1517.    Dim intResult        As Integer
  1518.    Dim strResult        As String
  1519.    Dim strDisplay       As String
  1520.    
  1521.    Dim i                As Integer
  1522.    
  1523.    Dim Str1             As String
  1524.    
  1525.    intResult = 0
  1526.    
  1527.    strResult = ""
  1528.    strDisplay = ""
  1529.      
  1530.    Str1 = Text1.Text
  1531.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1532.    Call cChangeChars(Str1, "AZM", "qyc")
  1533.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1534.  
  1535.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1536.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1537.    Call cChangeChars(Str1, "AZM", "qyc")
  1538.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1539.  
  1540.    strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1541.    Call cChangeChars(Str1, "qyc", "+-*")
  1542.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1543.  
  1544.    txt_Result = strDisplay
  1545.  
  1546.    'time the function
  1547.  
  1548.    Str1 = Text1.Text
  1549.    
  1550.    TimerHandle = cTimerOpen()
  1551.    TimerStartOk = cTimerStart(TimerHandle)
  1552.    
  1553.    For i = 1 To Iteration
  1554.       Call cChangeChars(Str1, "AZM", "qyc")
  1555.    Next i
  1556.    
  1557.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1558.    
  1559.    TimerCloseOk = cTimerClose(TimerHandle)
  1560.  
  1561. End Sub
  1562.  
  1563. Private Sub TestChangeCharsUntil()
  1564.    
  1565.    Dim intResult        As Integer
  1566.    Dim strResult        As String
  1567.    Dim strDisplay       As String
  1568.    
  1569.    Dim i                As Integer
  1570.    
  1571.    Dim Str1             As String
  1572.    
  1573.    intResult = 0
  1574.    
  1575.    strResult = ""
  1576.    strDisplay = ""
  1577.      
  1578.    Str1 = Text1.Text
  1579.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1580.    Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1581.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1582.  
  1583.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1584.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1585.    Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1586.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1587.  
  1588.    strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1589.    Call cChangeCharsUntil(Str1, "qyc", "+-*", "N")
  1590.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1591.  
  1592.    txt_Result = strDisplay
  1593.  
  1594.    'time the function
  1595.  
  1596.    Str1 = Text1.Text
  1597.    
  1598.    TimerHandle = cTimerOpen()
  1599.    TimerStartOk = cTimerStart(TimerHandle)
  1600.    
  1601.    For i = 1 To Iteration
  1602.       Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1603.    Next i
  1604.    
  1605.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1606.    
  1607.    TimerCloseOk = cTimerClose(TimerHandle)
  1608.  
  1609. End Sub
  1610.  
  1611. Private Sub TestCheckChars()
  1612.    
  1613.    Dim intResult        As Integer
  1614.    Dim strResult        As String
  1615.    Dim strDisplay       As String
  1616.    
  1617.    Dim i                As Integer
  1618.    
  1619.    Dim Str1             As String
  1620.    
  1621.    intResult = 0
  1622.    
  1623.    strResult = ""
  1624.    strDisplay = ""
  1625.      
  1626.    Str1 = Text1.Text
  1627.    strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1628.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1629.    strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1630.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1631.  
  1632.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1633.    strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1634.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1635.    strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1636.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present")
  1637.    
  1638.    txt_Result = strDisplay
  1639.  
  1640.    'time the function
  1641.  
  1642.    Str1 = Text1.Text
  1643.    
  1644.    TimerHandle = cTimerOpen()
  1645.    TimerStartOk = cTimerStart(TimerHandle)
  1646.    
  1647.    For i = 1 To Iteration
  1648.       intResult = cCheckChars(Str1, "aZ")
  1649.    Next i
  1650.    
  1651.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1652.    
  1653.    TimerCloseOk = cTimerClose(TimerHandle)
  1654.  
  1655. End Sub
  1656.  
  1657. Private Sub TestFilterChars()
  1658.    
  1659.    Dim intResult        As Integer
  1660.    Dim strResult        As String
  1661.    Dim strDisplay       As String
  1662.    
  1663.    Dim i                As Integer
  1664.    
  1665.    Dim Str1             As String
  1666.    
  1667.    intResult = 0
  1668.    
  1669.    strResult = ""
  1670.    strDisplay = ""
  1671.      
  1672.    Str1 = Text1.Text
  1673.    strDisplay = strDisplay & "Filter 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1674.    strDisplay = strDisplay & cFilterChars(Str1, "B/") & vbCrLf & vbCrLf
  1675.  
  1676.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1677.    strDisplay = strDisplay & "Filter 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1678.    strDisplay = strDisplay & cFilterChars(Str1, "BY")
  1679.    
  1680.    txt_Result = strDisplay
  1681.  
  1682.    'time the function
  1683.  
  1684.    Str1 = Text1.Text
  1685.    
  1686.    TimerHandle = cTimerOpen()
  1687.    TimerStartOk = cTimerStart(TimerHandle)
  1688.    
  1689.    For i = 1 To Iteration
  1690.       strResult = cFilterChars(Str1, "B/")
  1691.    Next i
  1692.    
  1693.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1694.    
  1695.    TimerCloseOk = cTimerClose(TimerHandle)
  1696.  
  1697. End Sub
  1698.  
  1699. Private Sub TestFilterNotChars()
  1700.    
  1701.    Dim intResult        As Integer
  1702.    Dim strResult        As String
  1703.    Dim strDisplay       As String
  1704.    
  1705.    Dim i                As Integer
  1706.    
  1707.    Dim Str1             As String
  1708.    
  1709.    intResult = 0
  1710.    
  1711.    strResult = ""
  1712.    strDisplay = ""
  1713.      
  1714.    Str1 = Text1.Text
  1715.    strDisplay = strDisplay & "Filter not 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1716.    strDisplay = strDisplay & cFilterNotChars(Str1, "B/") & vbCrLf & vbCrLf
  1717.  
  1718.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1719.    strDisplay = strDisplay & "Filter not 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1720.    strDisplay = strDisplay & cFilterNotChars(Str1, "BY")
  1721.    
  1722.    txt_Result = strDisplay
  1723.  
  1724.    'time the function
  1725.  
  1726.    Str1 = Text1.Text
  1727.    
  1728.    TimerHandle = cTimerOpen()
  1729.    TimerStartOk = cTimerStart(TimerHandle)
  1730.    
  1731.    For i = 1 To Iteration
  1732.       strResult = cFilterNotChars(Str1, "B/")
  1733.    Next i
  1734.    
  1735.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1736.    
  1737.    TimerCloseOk = cTimerClose(TimerHandle)
  1738.  
  1739. End Sub
  1740.  
  1741. Private Sub TestFilterBlocks()
  1742.    
  1743.    Dim intResult        As Integer
  1744.    Dim strResult        As String
  1745.    Dim strDisplay       As String
  1746.    
  1747.    Dim i                As Integer
  1748.    
  1749.    Dim Str1             As String
  1750.    
  1751.    intResult = 0
  1752.    
  1753.    strResult = ""
  1754.    strDisplay = ""
  1755.      
  1756.    Str1 = Text1.Text
  1757.    
  1758.    strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1759.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf
  1760.  
  1761.    strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1762.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'" & vbCrLf & vbCrLf
  1763.  
  1764.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1765.    
  1766.    strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1767.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf
  1768.  
  1769.    strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1770.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'"
  1771.    
  1772.    txt_Result = strDisplay
  1773.  
  1774.    'time the function
  1775.  
  1776.    Str1 = Text1.Text
  1777.    
  1778.    TimerHandle = cTimerOpen()
  1779.    TimerStartOk = cTimerStart(TimerHandle)
  1780.    
  1781.    For i = 1 To Iteration
  1782.       strResult = cFilterBlocks(Str1, "BI")
  1783.    Next i
  1784.    
  1785.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1786.    
  1787.    TimerCloseOk = cTimerClose(TimerHandle)
  1788.  
  1789. End Sub
  1790.  
  1791. Private Sub TestResizeString()
  1792.    
  1793.    Dim intResult        As Integer
  1794.    Dim strResult        As String
  1795.    Dim strDisplay       As String
  1796.    
  1797.    Dim i                As Integer
  1798.    
  1799.    Dim Str1             As String
  1800.    
  1801.    intResult = 0
  1802.    
  1803.    strResult = ""
  1804.    strDisplay = ""
  1805.      
  1806.    Str1 = Text1.Text
  1807.    
  1808.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1809.    strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf
  1810.    
  1811.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1812.    strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf
  1813.  
  1814.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1815.    strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf
  1816.  
  1817.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1818.    strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'" & vbCrLf & vbCrLf
  1819.  
  1820.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1821.    
  1822.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1823.    strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf
  1824.    
  1825.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1826.    strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf
  1827.    
  1828.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1829.    strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf
  1830.  
  1831.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1832.    strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'"
  1833.  
  1834.    txt_Result = strDisplay
  1835.  
  1836.    'time the function
  1837.  
  1838.    Str1 = Text1.Text
  1839.    
  1840.    TimerHandle = cTimerOpen()
  1841.    TimerStartOk = cTimerStart(TimerHandle)
  1842.    
  1843.    For i = 1 To Iteration
  1844.       strResult = cResizeString(Str1, 5)
  1845.    Next i
  1846.    
  1847.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1848.    
  1849.    TimerCloseOk = cTimerClose(TimerHandle)
  1850.  
  1851. End Sub
  1852.  
  1853. Private Sub TestResizeStringAndFill()
  1854.    
  1855.    Dim intResult        As Integer
  1856.    Dim strResult        As String
  1857.    Dim strDisplay       As String
  1858.    
  1859.    Dim i                As Integer
  1860.    
  1861.    Dim Str1             As String
  1862.    
  1863.    intResult = 0
  1864.    
  1865.    strResult = ""
  1866.    strDisplay = ""
  1867.      
  1868.    Str1 = Text1.Text
  1869.    
  1870.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1871.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf
  1872.    
  1873.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1874.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf
  1875.  
  1876.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1877.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf
  1878.  
  1879.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1880.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'" & vbCrLf & vbCrLf
  1881.  
  1882.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1883.    
  1884.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1885.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf
  1886.    
  1887.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1888.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf
  1889.    
  1890.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1891.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf
  1892.  
  1893.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1894.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'"
  1895.  
  1896.    txt_Result = strDisplay
  1897.  
  1898.    'time the function
  1899.  
  1900.    Str1 = Text1.Text
  1901.    
  1902.    TimerHandle = cTimerOpen()
  1903.    TimerStartOk = cTimerStart(TimerHandle)
  1904.    
  1905.    For i = 1 To Iteration
  1906.       strResult = cResizeStringAndFill(Str1, 50, "*")
  1907.    Next i
  1908.    
  1909.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1910.    
  1911.    TimerCloseOk = cTimerClose(TimerHandle)
  1912.  
  1913. End Sub
  1914.  
  1915. Private Sub TestCreateAndFill()
  1916.    
  1917.    Dim intResult        As Integer
  1918.    Dim strResult        As String
  1919.    Dim strDisplay       As String
  1920.    
  1921.    Dim i                As Integer
  1922.    
  1923.    Dim Str1             As String
  1924.    
  1925.    intResult = 0
  1926.    
  1927.    strResult = ""
  1928.    strDisplay = ""
  1929.      
  1930.    Str1 = Text1.Text
  1931.    
  1932.    strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1933.    strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf
  1934.    
  1935.    strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1936.    strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'" & vbCrLf & vbCrLf
  1937.    
  1938.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1939.    
  1940.    strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1941.    strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf
  1942.    
  1943.    strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1944.    strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'"
  1945.  
  1946.    txt_Result = strDisplay
  1947.  
  1948.    'time the function
  1949.  
  1950.    Str1 = Text1.Text
  1951.    
  1952.    TimerHandle = cTimerOpen()
  1953.    TimerStartOk = cTimerStart(TimerHandle)
  1954.    
  1955.    For i = 1 To Iteration
  1956.       strResult = cCreateAndFill(40, Str1)
  1957.    Next i
  1958.    
  1959.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1960.    
  1961.    TimerCloseOk = cTimerClose(TimerHandle)
  1962.  
  1963. End Sub
  1964.  
  1965. Private Sub TestFill()
  1966.    
  1967.    Dim intResult        As Integer
  1968.    Dim strResult        As String
  1969.    Dim strDisplay       As String
  1970.    
  1971.    Dim i                As Integer
  1972.    
  1973.    Dim Str1             As String
  1974.    
  1975.    intResult = 0
  1976.    
  1977.    strResult = ""
  1978.    strDisplay = ""
  1979.      
  1980.    Str1 = Text1.Text
  1981.    
  1982.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '*=' is " & vbCrLf & vbCrLf
  1983.    Call cFill(Str1, "*=")
  1984.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1985.    
  1986.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '=*=' is " & vbCrLf & vbCrLf
  1987.    Call cFill(Str1, "=*=")
  1988.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1989.    
  1990.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1991.    
  1992.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '7516' is " & vbCrLf & vbCrLf
  1993.    Call cFill(Str1, "7516")
  1994.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1995.    
  1996.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '$61.00' is " & vbCrLf & vbCrLf
  1997.    Call cFill(Str1, "$61.00")
  1998.    strDisplay = strDisplay & "'" & Str1 & "'"
  1999.    
  2000.    txt_Result = strDisplay
  2001.  
  2002.    'time the function
  2003.  
  2004.    Str1 = Text1.Text
  2005.    
  2006.    TimerHandle = cTimerOpen()
  2007.    TimerStartOk = cTimerStart(TimerHandle)
  2008.    
  2009.    For i = 1 To Iteration
  2010.       Call cFill(Str1, "*=")
  2011.    Next i
  2012.    
  2013.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2014.    
  2015.    TimerCloseOk = cTimerClose(TimerHandle)
  2016.  
  2017. End Sub
  2018.  
  2019. Private Sub TestLrc()
  2020.    
  2021.    Dim intResult        As Integer
  2022.    Dim strResult        As String
  2023.    Dim strDisplay       As String
  2024.    
  2025.    Dim i                As Integer
  2026.    
  2027.    Dim Str1             As String
  2028.    
  2029.    intResult = 0
  2030.    
  2031.    strResult = ""
  2032.    strDisplay = ""
  2033.      
  2034.    Str1 = Text1.Text
  2035.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf
  2036.    
  2037.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  2038.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf
  2039.    
  2040.    Str1 = Chr$(2) & "0a12721536"
  2041.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'"
  2042.    
  2043.    txt_Result = strDisplay
  2044.  
  2045.    'time the function
  2046.  
  2047.    Str1 = Text1.Text
  2048.    
  2049.    TimerHandle = cTimerOpen()
  2050.    TimerStartOk = cTimerStart(TimerHandle)
  2051.    
  2052.    For i = 1 To Iteration
  2053.       strResult = cLrc(Str1)
  2054.    Next i
  2055.    
  2056.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2057.    
  2058.    TimerCloseOk = cTimerClose(TimerHandle)
  2059.  
  2060. End Sub
  2061.  
  2062. Private Sub TestCompress()
  2063.    
  2064.    Dim intResult        As Integer
  2065.    Dim strResult        As String
  2066.    Dim strDisplay       As String
  2067.    
  2068.    Dim i                As Integer
  2069.    
  2070.    Dim Str1             As String
  2071.    
  2072.    intResult = 0
  2073.    
  2074.    strResult = ""
  2075.    strDisplay = ""
  2076.      
  2077.    Str1 = Text1.Text
  2078.    
  2079.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  2080.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  2081.  
  2082.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  2083.    
  2084.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  2085.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  2086.    
  2087.    Str1 = "A " & Chr$(9) & "BC  "
  2088.    
  2089.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  2090.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  2091.    
  2092.    txt_Result = strDisplay
  2093.  
  2094.    'time the function
  2095.  
  2096.    Str1 = Text1.Text
  2097.    
  2098.    TimerHandle = cTimerOpen()
  2099.    TimerStartOk = cTimerStart(TimerHandle)
  2100.    
  2101.    For i = 1 To Iteration
  2102.       strResult = cCompress(Str1)
  2103.    Next i
  2104.    
  2105.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2106.    
  2107.    TimerCloseOk = cTimerClose(TimerHandle)
  2108.  
  2109. End Sub
  2110.  
  2111. Public Sub TestCompressTab()
  2112.    
  2113.    Dim intResult        As Integer
  2114.    Dim strResult        As String
  2115.    Dim strDisplay       As String
  2116.    
  2117.    Dim i                As Integer
  2118.    
  2119.    Dim Str1             As String
  2120.    Dim Str2             As String
  2121.    Dim Str3             As String
  2122.    
  2123.    intResult = 0
  2124.    
  2125.    strResult = ""
  2126.    strDisplay = ""
  2127.      
  2128.    Str1 = "A      BC   DEF  GHIJ  "
  2129.    
  2130.    For i = 1 To 6
  2131.       Str2 = cCompressTab(Str1, i)
  2132.       Str3 = Str2
  2133.       Call cChangeChars(Str3, vbTab, "ª")
  2134.       strDisplay = strDisplay & "Compress tab (" & i & " chars) into '" & Str1 & "' is '" & Str3 & "'" & vbCrLf
  2135.       strDisplay = strDisplay & "Expand tab (" & i & " chars) into '" & Str3 & "' is '" & cExpandTab(Str2, i) & "'" & vbCrLf & vbCrLf
  2136.    Next i
  2137.  
  2138.    txt_Result = strDisplay
  2139.  
  2140.    'time the function
  2141.  
  2142.    Str1 = Text1.Text
  2143.    
  2144.    TimerHandle = cTimerOpen()
  2145.    TimerStartOk = cTimerStart(TimerHandle)
  2146.    
  2147.    For i = 1 To Iteration
  2148.       strResult = cCompressTab(Str1, 3)
  2149.    Next i
  2150.    
  2151.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2152.    
  2153.    TimerCloseOk = cTimerClose(TimerHandle)
  2154.  
  2155. End Sub
  2156.  
  2157. Private Sub TestCompact()
  2158.    
  2159.    Dim intResult        As Integer
  2160.    Dim strResult        As String
  2161.    Dim strDisplay       As String
  2162.    
  2163.    Dim i                As Integer
  2164.    
  2165.    Dim Str1             As String
  2166.    Dim Str2             As String
  2167.    
  2168.    intResult = 0
  2169.    
  2170.    strResult = ""
  2171.    strDisplay = ""
  2172.      
  2173.    Str1 = "987654321"
  2174.    Str2 = cCompact(Str1)
  2175.    
  2176.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  2177.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  2178.  
  2179.    Str1 = "1234567890"
  2180.    Str2 = cCompact(Str1)
  2181.    
  2182.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  2183.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  2184.  
  2185.    Str1 = Text1.Text
  2186.    Str2 = cCompact(Str1)
  2187.    
  2188.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  2189.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  2190.  
  2191.    txt_Result = strDisplay
  2192.  
  2193.    'time the function
  2194.  
  2195.    Str1 = Text1.Text
  2196.    
  2197.    TimerHandle = cTimerOpen()
  2198.    TimerStartOk = cTimerStart(TimerHandle)
  2199.    
  2200.    For i = 1 To Iteration
  2201.       strResult = cCompact(Str1)
  2202.    Next i
  2203.    
  2204.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2205.    
  2206.    TimerCloseOk = cTimerClose(TimerHandle)
  2207.  
  2208. End Sub
  2209.  
  2210. Private Sub TestAlign()
  2211.    
  2212.    Dim intResult        As Integer
  2213.    Dim strResult        As String
  2214.    Dim strDisplay       As String
  2215.    
  2216.    Dim i                As Integer
  2217.    
  2218.    Dim Str1             As String
  2219.    Dim Str2             As String
  2220.    
  2221.    intResult = 0
  2222.    
  2223.    strResult = ""
  2224.    strDisplay = ""
  2225.      
  2226.    Str1 = "T2WIN-32"
  2227.    
  2228.    strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2229.    strDisplay = strDisplay & "'" & cAlign(Str1, -1, 30) & "'" & vbCrLf & vbCrLf
  2230.    
  2231.    strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2232.    strDisplay = strDisplay & "'" & cAlign(Str1, 0, 30) & "'" & vbCrLf & vbCrLf
  2233.    
  2234.    strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2235.    strDisplay = strDisplay & "'" & cAlign(Str1, 1, 30) & "'" & vbCrLf & vbCrLf
  2236.    
  2237.    Str1 = Text1.Text
  2238.    
  2239.    strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2240.    strDisplay = strDisplay & "'" & cAlign(Str1, -1, 50) & "'" & vbCrLf & vbCrLf
  2241.    
  2242.    strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2243.    strDisplay = strDisplay & "'" & cAlign(Str1, 0, 50) & "'" & vbCrLf & vbCrLf
  2244.    
  2245.    strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2246.    strDisplay = strDisplay & "'" & cAlign(Str1, 1, 50) & "'"
  2247.    
  2248.    txt_Result = strDisplay
  2249.  
  2250.    'time the function
  2251.  
  2252.    Str1 = Text1.Text
  2253.    
  2254.    TimerHandle = cTimerOpen()
  2255.    TimerStartOk = cTimerStart(TimerHandle)
  2256.    
  2257.    For i = 1 To Iteration
  2258.       strResult = cAlign(Str1, 1, 30)
  2259.    Next i
  2260.    
  2261.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2262.    
  2263.    TimerCloseOk = cTimerClose(TimerHandle)
  2264.  
  2265. End Sub
  2266.  
  2267. Private Sub TestProperName()
  2268.    
  2269.    Dim intResult        As Integer
  2270.    Dim strResult        As String
  2271.    Dim strDisplay       As String
  2272.    
  2273.    Dim i                As Integer
  2274.    
  2275.    Dim Str1             As String
  2276.    Dim Str2             As String
  2277.    
  2278.    intResult = 0
  2279.    
  2280.    strResult = ""
  2281.    strDisplay = ""
  2282.      
  2283.    Str1 = Text1.Text
  2284.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  2285.    Str1 = "John fitz,jr"
  2286.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  2287.    Str1 = "john Fitz, jr"
  2288.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  2289.    Str1 = "macdonald"
  2290.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  2291.    Str1 = "mac donald"
  2292.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1)
  2293.                   
  2294.    txt_Result = strDisplay
  2295.  
  2296.    'time the function
  2297.  
  2298.    Str1 = Text1.Text
  2299.    
  2300.    TimerHandle = cTimerOpen()
  2301.    TimerStartOk = cTimerStart(TimerHandle)
  2302.    
  2303.    For i = 1 To Iteration
  2304.       strResult = cProperName(Str1)
  2305.    Next i
  2306.    
  2307.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2308.    
  2309.    TimerCloseOk = cTimerClose(TimerHandle)
  2310.  
  2311. End Sub
  2312.  
  2313. Private Sub TestProperName2()
  2314.    
  2315.    Dim intResult        As Integer
  2316.    Dim strResult        As String
  2317.    Dim strDisplay       As String
  2318.    
  2319.    Dim i                As Integer
  2320.    
  2321.    Dim Str1             As String
  2322.    Dim Str2             As String
  2323.    
  2324.    intResult = 0
  2325.    
  2326.    strResult = ""
  2327.    strDisplay = ""
  2328.      
  2329.    Str1 = Text1.Text
  2330.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  2331.    Str1 = "JOHN FITZ,JR"
  2332.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_UPPERCASE Or PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2333.    Str1 = "john Fitz,jr"
  2334.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2335.    Str1 = "macdonald"
  2336.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  2337.    Str1 = "mac donald"
  2338.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  2339.    Str1 = "a.l. greene jr."
  2340.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2341.    Str1 = "shale and sandstone and till"
  2342.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2343.    Str1 = "a sandstone or a shale"
  2344.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/or/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2345.    Str1 = "RR2 BARRHEAD"
  2346.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "rr2", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL) & "'" & vbCrLf & vbCrLf
  2347.    Str1 = "ANDY MACDONALD"
  2348.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "mac", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL Or PN_ONLY_LEADER_SPACE) & "'"
  2349.                   
  2350.    txt_Result = strDisplay
  2351.  
  2352.    'time the function
  2353.  
  2354.    Str1 = Text1.Text
  2355.    
  2356.    TimerHandle = cTimerOpen()
  2357.    TimerStartOk = cTimerStart(TimerHandle)
  2358.    
  2359.    For i = 1 To Iteration
  2360.       strResult = cProperName2(Str1, "", 0)
  2361.    Next i
  2362.    
  2363.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2364.    
  2365.    TimerCloseOk = cTimerClose(TimerHandle)
  2366.  
  2367. End Sub
  2368.  
  2369. Private Sub TestStringSAR()
  2370.    
  2371.    Dim intResult        As Integer
  2372.    Dim strResult        As String
  2373.    Dim strDisplay       As String
  2374.    
  2375.    Dim i                As Integer
  2376.    
  2377.    Dim Str1             As String
  2378.    Dim Str2             As String
  2379.    
  2380.    intResult = 0
  2381.    
  2382.    strResult = ""
  2383.    strDisplay = ""
  2384.      
  2385.    Str1 = "T2WIN-32, T2WIN-32, T2WIN-32, T2WIN-32 IS A DLL"
  2386.    Str2 = cStringSAR(Str1, "T2WIN-32", "t2win-32", False)
  2387.    
  2388.    strDisplay = strDisplay & "Replace 'T2WIN-32' by 't2win-32'" & vbCrLf
  2389.    strDisplay = strDisplay & "     in" & vbCrLf
  2390.    strDisplay = strDisplay & Str1 & vbCrLf
  2391.    strDisplay = strDisplay & "     is" & vbCrLf
  2392.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  2393.  
  2394.    Str2 = cStringSAR(Str1, "2W", "IME TO W", True)
  2395.  
  2396.    strDisplay = strDisplay & "Replace '2W' by 'IME TO W'" & vbCrLf
  2397.    strDisplay = strDisplay & "     in" & vbCrLf
  2398.    strDisplay = strDisplay & Str1 & vbCrLf
  2399.    strDisplay = strDisplay & "     is" & vbCrLf
  2400.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  2401.  
  2402.    Str2 = cStringSAR(Str1, "T2WIN-32", "", True)
  2403.  
  2404.    strDisplay = strDisplay & "Replace 'T2WIN-32, ' by ''" & vbCrLf
  2405.    strDisplay = strDisplay & "     in" & vbCrLf
  2406.    strDisplay = strDisplay & Str1 & vbCrLf
  2407.    strDisplay = strDisplay & "     is" & vbCrLf
  2408.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  2409.  
  2410.    Str2 = cStringSAR(Str1, "I", "i", False)
  2411.  
  2412.    strDisplay = strDisplay & "Replace 'I' by 'i'" & vbCrLf
  2413.    strDisplay = strDisplay & "     in" & vbCrLf
  2414.    strDisplay = strDisplay & Str1 & vbCrLf
  2415.    strDisplay = strDisplay & "     is" & vbCrLf
  2416.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  2417.  
  2418.    txt_Result = strDisplay
  2419.  
  2420.    'time the function
  2421.  
  2422.    Str1 = Text1.Text
  2423.    
  2424.    TimerHandle = cTimerOpen()
  2425.    TimerStartOk = cTimerStart(TimerHandle)
  2426.    
  2427.    For i = 1 To Iteration
  2428.       strResult = cStringSAR(Str1, "T2WIN-32", "t2win-32", False)
  2429.    Next i
  2430.    
  2431.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2432.    
  2433.    TimerCloseOk = cTimerClose(TimerHandle)
  2434.  
  2435. End Sub
  2436.  
  2437. Private Sub TestToHexa()
  2438.    
  2439.    Dim intResult        As Integer
  2440.    Dim strResult        As String
  2441.    Dim strDisplay       As String
  2442.    
  2443.    Dim i                As Integer
  2444.    
  2445.    Dim Str1             As String
  2446.    Dim Str2             As String
  2447.    
  2448.    intResult = 0
  2449.    
  2450.    strResult = ""
  2451.    strDisplay = ""
  2452.    
  2453.    Str1 = Text1.Text
  2454.    Str2 = cToHexa(Str1)
  2455.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2456.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2457.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2458.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf
  2459.  
  2460.    Str1 = "ABCDEFGH"
  2461.    Str2 = cToHexa(Str1)
  2462.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2463.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2464.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2465.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf
  2466.  
  2467.    Str1 = "01234567890"
  2468.    Str2 = cToHexa(Str1)
  2469.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2470.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2471.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2472.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'"
  2473.  
  2474.    txt_Result = strDisplay
  2475.  
  2476.    'time the function
  2477.  
  2478.    Str1 = Text1.Text
  2479.    
  2480.    TimerHandle = cTimerOpen()
  2481.    TimerStartOk = cTimerStart(TimerHandle)
  2482.    
  2483.    For i = 1 To Iteration
  2484.       strResult = cToHexa(Str1)
  2485.    Next i
  2486.    
  2487.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2488.    
  2489.    TimerCloseOk = cTimerClose(TimerHandle)
  2490.  
  2491. End Sub
  2492.  
  2493. Private Sub TestRomanArabic()
  2494.    
  2495.    Dim intResult        As Integer
  2496.    Dim strResult        As String
  2497.    Dim strDisplay       As String
  2498.    
  2499.    Dim i                As Integer
  2500.    
  2501.    Dim Str1             As String
  2502.    Dim Value            As Integer
  2503.    
  2504.    intResult = 0
  2505.    
  2506.    strResult = ""
  2507.    strDisplay = ""
  2508.    
  2509.    Str1 = UCase$(cArabicToRoman(Year(Int(Now))))
  2510.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  2511.    
  2512.    Str1 = UCase$(cArabicToRoman(Year(Int(Now)) - 1))
  2513.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  2514.    
  2515.    Str1 = UCase$(cArabicToRoman(Year(Int(Now)) + 1))
  2516.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  2517.  
  2518.    Value = Year(Int(Now))
  2519.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  2520.    Value = Year(Int(Now)) - 1
  2521.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  2522.    Value = Year(Int(Now)) + 1
  2523.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  2524.  
  2525.    txt_Result = strDisplay
  2526.  
  2527.    'time the function
  2528.  
  2529.    Str1 = Text1.Text
  2530.    
  2531.    TimerHandle = cTimerOpen()
  2532.    TimerStartOk = cTimerStart(TimerHandle)
  2533.    
  2534.    For i = 1 To Iteration
  2535.       strResult = cArabicToRoman(1996)
  2536.    Next i
  2537.    
  2538.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2539.    
  2540.    TimerCloseOk = cTimerClose(TimerHandle)
  2541.  
  2542. End Sub
  2543.  
  2544. Private Sub TestAsciiEbcdic()
  2545.    
  2546.    Dim intResult        As Integer
  2547.    Dim strResult        As String
  2548.    Dim strDisplay       As String
  2549.    
  2550.    Dim i                As Integer
  2551.    
  2552.    Dim Str1             As String
  2553.    Dim Str2             As String
  2554.    
  2555.    intResult = 0
  2556.    
  2557.    strResult = ""
  2558.    strDisplay = ""
  2559.    
  2560.    Str1 = Text1.Text
  2561.    Str2 = Str1
  2562.    Call cCnvASCIItoEBCDIC(Str2)
  2563.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2564.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2565.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2566.    Call cCnvEBCDICtoASCII(Str2)
  2567.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2568.  
  2569.    Str1 = "ABCDEFGH"
  2570.    Str2 = Str1
  2571.    Call cCnvASCIItoEBCDIC(Str2)
  2572.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2573.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2574.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2575.    Call cCnvEBCDICtoASCII(Str2)
  2576.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2577.  
  2578.    Str1 = "01234567890"
  2579.    Str2 = Str1
  2580.    Call cCnvASCIItoEBCDIC(Str2)
  2581.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2582.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2583.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2584.    Call cCnvEBCDICtoASCII(Str2)
  2585.    strDisplay = strDisplay & "'" & Str2 & "'"
  2586.  
  2587.    txt_Result = strDisplay
  2588.  
  2589.    'time the function
  2590.  
  2591.    Str1 = Text1.Text
  2592.    
  2593.    TimerHandle = cTimerOpen()
  2594.    TimerStartOk = cTimerStart(TimerHandle)
  2595.    
  2596.    For i = 1 To Iteration
  2597.       Call cCnvASCIItoEBCDIC(Str1)
  2598.    Next i
  2599.    
  2600.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2601.    
  2602.    TimerCloseOk = cTimerClose(TimerHandle)
  2603.  
  2604. End Sub
  2605.  
  2606. Private Sub TestPatternMatch()
  2607.    
  2608.    Dim intResult        As Integer
  2609.    Dim strResult        As String
  2610.    Dim strDisplay       As String
  2611.    
  2612.    Dim i                As Integer
  2613.    
  2614.    Dim Str1             As String
  2615.    Dim Str2             As String
  2616.    
  2617.    intResult = 0
  2618.    
  2619.    strResult = ""
  2620.    strDisplay = ""
  2621.    
  2622.    Str1 = "Under the blue sky, the sun lights"
  2623.  
  2624.    strDisplay = "PatternMatch '" & Str1 & "' with" & vbCrLf & vbCrLf
  2625.  
  2626.    Str2 = "*"
  2627.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2628.    Str2 = "*??*???*?"
  2629.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2630.    Str2 = "*Under*"
  2631.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2632.    Str2 = "*sky*"
  2633.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2634.    Str2 = "*lights"
  2635.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2636.    Str2 = "??der*sky*ligh??*"
  2637.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2638.    Str2 = "Under?the * s??,*"
  2639.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf
  2640.  
  2641.    Str2 = "*under*"
  2642.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2643.    Str2 = "Under*sun"
  2644.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2645.    Str2 = "Under t??e*"
  2646.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf
  2647.  
  2648.    strDisplay = strDisplay & "PatternMatchS (case insensitive) '" & Str1 & "' with" & vbCrLf & vbCrLf
  2649.  
  2650.    Str2 = "*"
  2651.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatchS(Str1, Str2, False) & vbCrLf
  2652.    Str2 = "*??*???*?"
  2653.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatchS(Str1, Str2, False) & vbCrLf
  2654.    Str2 = "*Under*"
  2655.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatchS(Str1, Str2, False) & vbCrLf
  2656.    Str2 = "*sky*"
  2657.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatchS(Str1, Str2, False) & vbCrLf
  2658.    Str2 = "*lights"
  2659.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatchS(Str1, Str2, False) & vbCrLf
  2660.    Str2 = "??der*sky*ligh??*"
  2661.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatchS(Str1, Str2, False) & vbCrLf
  2662.    Str2 = "Under?the * s??,*"
  2663.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatchS(Str1, Str2, False) & vbCrLf & vbCrLf
  2664.  
  2665.    Str2 = "*under*"
  2666.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatchS(Str1, Str2, False) & vbCrLf
  2667.    Str2 = "Under*sun"
  2668.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatchS(Str1, Str2, False) & vbCrLf
  2669.    Str2 = "Under t??e*"
  2670.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatchS(Str1, Str2, False) & vbCrLf & vbCrLf
  2671.  
  2672.    txt_Result = strDisplay
  2673.  
  2674.    'time the function
  2675.  
  2676.    Str2 = "Under?the * s??,*"
  2677.    
  2678.    TimerHandle = cTimerOpen()
  2679.    TimerStartOk = cTimerStart(TimerHandle)
  2680.    
  2681.    For i = 1 To Iteration
  2682.       intResult = cPatternMatch(Str1, Str2)
  2683.    Next i
  2684.    
  2685.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2686.    
  2687.    TimerCloseOk = cTimerClose(TimerHandle)
  2688.  
  2689. End Sub
  2690.  
  2691. Private Sub TestPatternExtMatch()
  2692.    
  2693.    Dim intResult        As Integer
  2694.    Dim strResult        As String
  2695.    Dim strDisplay       As String
  2696.    
  2697.    Dim i                As Integer
  2698.    
  2699.    Dim Str1             As String
  2700.    Dim Str2             As String
  2701.    
  2702.    intResult = 0
  2703.    
  2704.    strResult = ""
  2705.    strDisplay = ""
  2706.    
  2707.    Str1 = "Under the blue sky, the sun lights"
  2708.  
  2709.    strDisplay = "PatternExtMatch '" & Str1 & "' with" & vbCrLf & vbCrLf
  2710.    
  2711.    Str2 = "*"
  2712.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2713.    Str2 = "*??*???*?"
  2714.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2715.    Str2 = "*Under*"
  2716.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2717.    Str2 = "*sky*"
  2718.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2719.    Str2 = "*lights"
  2720.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2721.    Str2 = "??der*sky*ligh??*"
  2722.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2723.    Str2 = "Under?the * s??,*"
  2724.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2725.    Str2 = "'U-U''a-z''a-z''a-z''a-z'?the *"
  2726.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2727.    Str2 = "'U-U''!A-Z''^A-Z''^A-Z''!A-Z'?the *'s-s'"
  2728.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2729.    Str2 = "~55~6E*~73"
  2730.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2731.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rstu'"
  2732.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2733.    Str2 = "Under?the *'~72~73~74~75'"
  2734.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf
  2735.  
  2736.    Str2 = "*under*"
  2737.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2738.    Str2 = "Under*sun"
  2739.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2740.    Str2 = "Under t??e*"
  2741.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2742.    Str2 = "'U-U''!a-z''^A-Z''^A-Z''!A-Z'?the *'!s-s'"
  2743.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2744.    Str2 = "~55~6G*~73"
  2745.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2746.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rStu'"
  2747.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2748.    Str2 = "Under?the *'~72~53~74~75'"
  2749.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf
  2750.  
  2751.    strDisplay = strDisplay & "PatternExtMatchS (case insensitive) '" & Str1 & "' with" & vbCrLf & vbCrLf
  2752.    
  2753.    Str2 = "*"
  2754.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2755.    Str2 = "*??*???*?"
  2756.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2757.    Str2 = "*Under*"
  2758.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2759.    Str2 = "*sky*"
  2760.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2761.    Str2 = "*lights"
  2762.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2763.    Str2 = "??der*sky*ligh??*"
  2764.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2765.    Str2 = "Under?the * s??,*"
  2766.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2767.    Str2 = "'U-U''a-z''a-z''a-z''a-z'?the *"
  2768.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2769.    Str2 = "'U-U''!A-Z''^A-Z''^A-Z''!A-Z'?the *'s-s'"
  2770.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2771.    Str2 = "~55~6E*~73"
  2772.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2773.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rstu'"
  2774.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2775.    Str2 = "Under?the *'~72~73~74~75'"
  2776.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf & vbCrLf
  2777.  
  2778.    Str2 = "*under*"
  2779.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2780.    Str2 = "Under*sun"
  2781.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2782.    Str2 = "Under t??e*"
  2783.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2784.    Str2 = "'U-U''!a-z''^A-Z''^A-Z''!A-Z'?the *'!s-s'"
  2785.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2786.    Str2 = "~55~6G*~73"
  2787.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2788.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rStu'"
  2789.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf
  2790.    Str2 = "Under?the *'~72~53~74~75'"
  2791.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf & vbCrLf
  2792.  
  2793.    txt_Result = strDisplay
  2794.  
  2795.    'time the function
  2796.  
  2797.    Str2 = "Under?the * s??,*"
  2798.    
  2799.    TimerHandle = cTimerOpen()
  2800.    TimerStartOk = cTimerStart(TimerHandle)
  2801.    
  2802.    For i = 1 To Iteration
  2803.       intResult = cPatternExtMatch(Str1, Str2)
  2804.    Next i
  2805.    
  2806.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2807.    
  2808.    TimerCloseOk = cTimerClose(TimerHandle)
  2809.  
  2810. End Sub
  2811.  
  2812. Private Sub TestCheckNumericity()
  2813.    
  2814.    Dim intResult        As Integer
  2815.    Dim strResult        As String
  2816.    Dim strDisplay       As String
  2817.    
  2818.    Dim i                As Integer
  2819.    
  2820.    Dim Str1             As String
  2821.    
  2822.    intResult = 0
  2823.    
  2824.    strResult = ""
  2825.    strDisplay = ""
  2826.      
  2827.    Str1 = Text1.Text
  2828.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2829.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2830.    
  2831.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  2832.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2833.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2834.    
  2835.    Str1 = "1234567890"
  2836.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2837.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2838.    
  2839.    Str1 = "-1234567890"
  2840.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2841.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2842.    
  2843.    Str1 = "+12345.67890"
  2844.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2845.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2846.    
  2847.    txt_Result = strDisplay
  2848.  
  2849.    'time the function
  2850.  
  2851.    Str1 = Text1.Text
  2852.    
  2853.    TimerHandle = cTimerOpen()
  2854.    TimerStartOk = cTimerStart(TimerHandle)
  2855.    
  2856.    For i = 1 To Iteration
  2857.       intResult = cCheckNumericity(Str1)
  2858.    Next i
  2859.    
  2860.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2861.    
  2862.    TimerCloseOk = cTimerClose(TimerHandle)
  2863.  
  2864. End Sub
  2865.  
  2866. Private Sub TestAlphaDigit()
  2867.    
  2868.    Dim intResult        As Integer
  2869.    Dim strResult        As String
  2870.    Dim strDisplay       As String
  2871.    
  2872.    Dim i                As Integer
  2873.    
  2874.    Dim Str1             As String
  2875.    
  2876.    intResult = 0
  2877.    
  2878.    strResult = ""
  2879.    strDisplay = ""
  2880.      
  2881.    Str1 = "1234567890"
  2882.    
  2883.    strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf
  2884.    
  2885.    strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf
  2886.    
  2887.    strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf
  2888.    
  2889.    strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'" & vbCrLf & vbCrLf & vbCrLf
  2890.    
  2891.    Str1 = Text1.Text
  2892.    
  2893.    strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf
  2894.    
  2895.    strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf
  2896.    
  2897.    strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf
  2898.    
  2899.    strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'"
  2900.    
  2901.    txt_Result = strDisplay
  2902.  
  2903.    'time the function
  2904.  
  2905.    Str1 = Text1.Text
  2906.    
  2907.    TimerHandle = cTimerOpen()
  2908.    TimerStartOk = cTimerStart(TimerHandle)
  2909.    
  2910.    For i = 1 To Iteration
  2911.       intResult = cAddDigit(Str1)
  2912.    Next i
  2913.    
  2914.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2915.    
  2916.    TimerCloseOk = cTimerClose(TimerHandle)
  2917.  
  2918. End Sub
  2919.  
  2920. Private Sub TestH2X()
  2921.    
  2922.    Dim intResult        As Integer
  2923.    Dim strResult        As String
  2924.    Dim strDisplay       As String
  2925.    
  2926.    Dim i                As Integer
  2927.    
  2928.    Dim Str1             As String
  2929.    
  2930.    intResult = 0
  2931.    
  2932.    strResult = ""
  2933.    strDisplay = ""
  2934.      
  2935.    strDisplay = "Hexa to Integer" & vbCrLf & vbCrLf
  2936.  
  2937.    Str1 = "0"
  2938.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2939.    Str1 = "1"
  2940.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2941.    Str1 = "A"
  2942.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2943.    Str1 = "A1"
  2944.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2945.    Str1 = "A1B"
  2946.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2947.    Str1 = "7FFF"
  2948.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2949.    Str1 = "A1B2"
  2950.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2951.    Str1 = "FFFF"
  2952.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf & vbCrLf
  2953.  
  2954.    strDisplay = strDisplay & "Hexa to Long" & vbCrLf & vbCrLf
  2955.  
  2956.    Str1 = "0"
  2957.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2958.    Str1 = "1"
  2959.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2960.    Str1 = "A"
  2961.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2962.    Str1 = "A1"
  2963.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2964.    Str1 = "A1B"
  2965.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2966.    Str1 = "A1B2"
  2967.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2968.    Str1 = "7FFFFFFF"
  2969.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2970.    Str1 = "B2A1A1B2"
  2971.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2972.    Str1 = "FFFFFFFF"
  2973.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf & vbCrLf
  2974.    
  2975.    txt_Result = strDisplay
  2976.  
  2977.    'time the function
  2978.  
  2979.    Str1 = Text1.Text
  2980.    
  2981.    TimerHandle = cTimerOpen()
  2982.    TimerStartOk = cTimerStart(TimerHandle)
  2983.    
  2984.    For i = 1 To Iteration
  2985.       intResult = cH2I(Str1)
  2986.    Next i
  2987.    
  2988.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2989.    
  2990.    TimerCloseOk = cTimerClose(TimerHandle)
  2991.  
  2992. End Sub
  2993.  
  2994. Private Sub TestSortStr()
  2995.    
  2996.    Dim intResult        As Integer
  2997.    Dim strResult        As String
  2998.    Dim strDisplay       As String
  2999.    
  3000.    Dim i                As Integer
  3001.    
  3002.    Dim Str1             As String
  3003.    
  3004.    intResult = 0
  3005.    
  3006.    strResult = ""
  3007.    strDisplay = ""
  3008.      
  3009.    Str1 = Text1.Text
  3010.    Str1 = cResizeStringAndFill(Str1, 60, " ")
  3011.    strDisplay = strDisplay & "SortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  3012.    intResult = cSortStr(Str1, 20, 3)
  3013.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  3014.  
  3015.    Str1 = "ABCBCABECAEB"
  3016.    strDisplay = strDisplay & "SortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  3017.    intResult = cSortStr(Str1, 4, 3)
  3018.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf & vbCrLf
  3019.  
  3020.    Str1 = Text1.Text
  3021.    Str1 = cResizeStringAndFill(Str1, 60, " ")
  3022.    strDisplay = strDisplay & "ReverseSortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  3023.    intResult = cReverseSortStr(Str1, 20, 3)
  3024.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  3025.  
  3026.    Str1 = "ABCBCABECAEB"
  3027.    strDisplay = strDisplay & "ReverseSortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  3028.    intResult = cReverseSortStr(Str1, 4, 3)
  3029.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  3030.  
  3031.    txt_Result = strDisplay
  3032.  
  3033.    'time the function
  3034.  
  3035.    Str1 = Text1.Text
  3036.    
  3037.    TimerHandle = cTimerOpen()
  3038.    TimerStartOk = cTimerStart(TimerHandle)
  3039.    
  3040.    For i = 1 To Iteration
  3041.       strResult = cSortStr(Str1, 4, 3)
  3042.    Next i
  3043.    
  3044.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  3045.    
  3046.    TimerCloseOk = cTimerClose(TimerHandle)
  3047.  
  3048. End Sub
  3049.  
  3050. Private Sub TestMorse()
  3051.    
  3052.    Dim intResult        As Integer
  3053.    Dim strResult        As String
  3054.    Dim strDisplay       As String
  3055.    
  3056.    Dim i                As Integer
  3057.    
  3058.    Dim Str1             As String
  3059.    
  3060.    intResult = 0
  3061.    
  3062.    strResult = ""
  3063.    strDisplay = ""
  3064.      
  3065.    Str1 = Text1.Text
  3066.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  3067.  
  3068.    Str1 = "SOS"
  3069.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  3070.    
  3071.    Str1 = "T2WIN-32"
  3072.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  3073.    
  3074.    Str1 = "Nothing can beat the fox"
  3075.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  3076.    
  3077.    txt_Result = strDisplay
  3078.  
  3079.    'time the function
  3080.  
  3081.    Str1 = Text1.Text
  3082.    
  3083.    TimerHandle = cTimerOpen()
  3084.    TimerStartOk = cTimerStart(TimerHandle)
  3085.    
  3086.    For i = 1 To Iteration
  3087.       strResult = cMorse(Str1)
  3088.    Next i
  3089.    
  3090.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  3091.    
  3092.    TimerCloseOk = cTimerClose(TimerHandle)
  3093.  
  3094. End Sub
  3095.  
  3096. Private Sub TestToZ9()
  3097.    
  3098.    Dim intResult        As Integer
  3099.    Dim strResult        As String
  3100.    Dim strDisplay       As String
  3101.    
  3102.    Dim i                As Integer
  3103.    
  3104.    Dim Str1             As String
  3105.    Dim Str2             As String
  3106.    
  3107.    intResult = 0
  3108.    
  3109.    strResult = ""
  3110.    strDisplay = ""
  3111.    
  3112.    Str1 = Text1.Text
  3113.    Str2 = cToZ9(Str1)
  3114.    strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & vbCrLf & vbCrLf
  3115.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  3116.    strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & vbCrLf & vbCrLf
  3117.    strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'" & vbCrLf & vbCrLf
  3118.  
  3119.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  3120.    Str2 = cToZ9(Str1)
  3121.    strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & vbCrLf & vbCrLf
  3122.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  3123.    strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & vbCrLf & vbCrLf
  3124.    strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'" & vbCrLf & vbCrLf
  3125.  
  3126.    Str1 = "01234567890"
  3127.    Str2 = cToZ9(Str1)
  3128.    strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & vbCrLf & vbCrLf
  3129.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  3130.    strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & vbCrLf & vbCrLf
  3131.    strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'"
  3132.  
  3133.    txt_Result = strDisplay
  3134.  
  3135.    'time the function
  3136.  
  3137.    Str1 = Text1.Text
  3138.    
  3139.    TimerHandle = cTimerOpen()
  3140.    TimerStartOk = cTimerStart(TimerHandle)
  3141.    
  3142.    For i = 1 To Iteration
  3143.       strResult = cToZ9(Str1)
  3144.    Next i
  3145.    
  3146.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  3147.    
  3148.    TimerCloseOk = cTimerClose(TimerHandle)
  3149.  
  3150. End Sub
  3151.  
  3152. Private Sub TestDeleteSubString()
  3153.    
  3154.    Dim intResult        As Integer
  3155.    Dim strResult        As String
  3156.    Dim strDisplay       As String
  3157.    
  3158.    Dim i                As Integer
  3159.    
  3160.    Dim Str1             As String
  3161.   
  3162.    intResult = 0
  3163.    
  3164.    strResult = ""
  3165.    strDisplay = ""
  3166.      
  3167.    Str1 = Text1.Text
  3168.    
  3169.    strDisplay = strDisplay & "Case Insensitive and Case Sensitive" & vbCrLf & vbCrLf
  3170.    
  3171.    strDisplay = strDisplay & "Delete '' into '" & Str1 & "' is " & vbCrLf
  3172.    strDisplay = strDisplay & cDeleteSubString(Str1, "", False) & vbCrLf
  3173.    strDisplay = strDisplay & cDeleteSubString(Str1, "", True) & vbCrLf & vbCrLf
  3174.  
  3175.    strDisplay = strDisplay & "Delete 'a' into '" & Str1 & "' is " & vbCrLf
  3176.    strDisplay = strDisplay & cDeleteSubString(Str1, "a", False) & vbCrLf
  3177.    strDisplay = strDisplay & cDeleteSubString(Str1, "a", True) & vbCrLf & vbCrLf
  3178.  
  3179.    strDisplay = strDisplay & "Delete 'A' into '" & Str1 & "' is " & vbCrLf
  3180.    strDisplay = strDisplay & cDeleteSubString(Str1, "A", False) & vbCrLf
  3181.    strDisplay = strDisplay & cDeleteSubString(Str1, "A", True) & vbCrLf & vbCrLf
  3182.  
  3183.    strDisplay = strDisplay & "Delete 'mnop' into '" & Str1 & "' is " & vbCrLf
  3184.    strDisplay = strDisplay & cDeleteSubString(Str1, "mnop", False) & vbCrLf
  3185.    strDisplay = strDisplay & cDeleteSubString(Str1, "mnop", True) & vbCrLf & vbCrLf
  3186.    
  3187.    strDisplay = strDisplay & "Delete 'bcd' into '" & Str1 & "' is " & vbCrLf
  3188.    strDisplay = strDisplay & cDeleteSubString(Str1, "bcd", False) & vbCrLf
  3189.    strDisplay = strDisplay & cDeleteSubString(Str1, "bcd", True) & vbCrLf & vbCrLf
  3190.  
  3191.    Str1 = "this is a test and this is an another test"
  3192.  
  3193.    strDisplay = strDisplay & "Delete 'is' into '" & Str1 & "' is " & vbCrLf
  3194.    strDisplay = strDisplay & cDeleteSubString(Str1, "is", False) & vbCrLf
  3195.    strDisplay = strDisplay & cDeleteSubString(Str1, "is", True) & vbCrLf & vbCrLf
  3196.  
  3197.    strDisplay = strDisplay & "Delete 'test' into '" & Str1 & "' is " & vbCrLf
  3198.    strDisplay = strDisplay & cDeleteSubString(Str1, "test", False) & vbCrLf
  3199.    strDisplay = strDisplay & cDeleteSubString(Str1, "test", True) & vbCrLf & vbCrLf
  3200.  
  3201.    txt_Result = strDisplay
  3202.  
  3203.    'time the function
  3204.  
  3205.    TimerHandle = cTimerOpen()
  3206.    TimerStartOk = cTimerStart(TimerHandle)
  3207.    
  3208.    For i = 1 To Iteration
  3209.       strResult = cDeleteSubString(Str1, "a", False)
  3210.    Next i
  3211.    
  3212.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  3213.    
  3214.    TimerCloseOk = cTimerClose(TimerHandle)
  3215.    
  3216. End Sub
  3217.  
  3218. Private Sub TestStringReplace()
  3219.    
  3220.    Dim intResult        As Integer
  3221.    Dim strResult        As String
  3222.    Dim strDisplay       As String
  3223.    
  3224.    Dim i                As Integer
  3225.    
  3226.    Dim Str1             As String
  3227.    Dim Str2             As String
  3228.   
  3229.    intResult = 0
  3230.    
  3231.    strResult = ""
  3232.    strDisplay = ""
  3233.      
  3234.    Str1 = Text1.Text
  3235.    Str2 = "/bc/|/BC/"
  3236.    
  3237.    strDisplay = strDisplay & "Case Insensitive and Case Sensitive" & vbCrLf & vbCrLf
  3238.    
  3239.    strDisplay = strDisplay & "Process '" & Str1 & "' with '" & Str2 & "' is " & vbCrLf & vbCrLf
  3240.    strDisplay = strDisplay & cStringReplace(Str1, Str2, False) & vbCrLf
  3241.    strDisplay = strDisplay & cStringReplace(Str1, Str2, True) & vbCrLf & vbCrLf
  3242.  
  3243.    Str1 = "this si a test and this is na another test"
  3244.    Str2 = "si|is;na|an"
  3245.    
  3246.    strDisplay = strDisplay & "Process '" & Str1 & "' with '" & Str2 & "' is " & vbCrLf & vbCrLf
  3247.    strDisplay = strDisplay & cStringReplace(Str1, Str2, False) & vbCrLf
  3248.    strDisplay = strDisplay & cStringReplace(Str1, Str2, True) & vbCrLf & vbCrLf
  3249.  
  3250.    Str1 = "this si a test and this is na another test"
  3251.    Str2 = "this si a test|this is an another test;this is na another test|this is really an another test"
  3252.    
  3253.    strDisplay = strDisplay & "Process '" & Str1 & "' with '" & Str2 & "' is " & vbCrLf & vbCrLf
  3254.    strDisplay = strDisplay & cStringReplace(Str1, Str2, False) & vbCrLf
  3255.    strDisplay = strDisplay & cStringReplace(Str1, Str2, True) & vbCrLf & vbCrLf
  3256.  
  3257.    txt_Result = strDisplay
  3258.  
  3259.    'time the function
  3260.  
  3261.    TimerHandle = cTimerOpen()
  3262.    TimerStartOk = cTimerStart(TimerHandle)
  3263.    
  3264.    For i = 1 To Iteration
  3265.       strResult = cStringReplace(Str1, Str2, False)
  3266.    Next i
  3267.    
  3268.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  3269.    
  3270.    TimerCloseOk = cTimerClose(TimerHandle)
  3271.    
  3272. End Sub
  3273.  
  3274. Private Sub TestLRFill()
  3275.    
  3276.    Dim intResult        As Integer
  3277.    Dim strResult        As String
  3278.    Dim strDisplay       As String
  3279.    
  3280.    Dim i                As Integer
  3281.    
  3282.    Dim Str1             As String
  3283.   
  3284.    intResult = 0
  3285.    
  3286.    strResult = ""
  3287.    strDisplay = ""
  3288.      
  3289.    Str1 = "1234"
  3290.    
  3291.    strDisplay = strDisplay & "NewLength = 10" & vbCrLf & vbCrLf
  3292.    
  3293.    strDisplay = strDisplay & "LFill '" & Str1 & "' with ' ' is " & vbCrLf
  3294.    strDisplay = strDisplay & cLFill(Str1, " ", 10) & vbCrLf & vbCrLf
  3295.  
  3296.    strDisplay = strDisplay & "LFill '" & Str1 & "' with '0' is " & vbCrLf
  3297.    strDisplay = strDisplay & cLFill(Str1, "0", 10) & vbCrLf & vbCrLf
  3298.  
  3299.    strDisplay = strDisplay & "LFill '" & Str1 & "' with '_' is " & vbCrLf
  3300.    strDisplay = strDisplay & cLFill(Str1, "_", 10) & vbCrLf & vbCrLf
  3301.  
  3302.    strDisplay = strDisplay & "LFill '" & Str1 & "' with '' is " & vbCrLf
  3303.    strDisplay = strDisplay & cLFill(Str1, "", 10) & vbCrLf & vbCrLf
  3304.    
  3305.    strDisplay = strDisplay & vbCrLf & vbCrLf
  3306.  
  3307.    strDisplay = strDisplay & "RFill '" & Str1 & "' with ' ' is " & vbCrLf
  3308.    strDisplay = strDisplay & cRFill(Str1, " ", 10) & vbCrLf & vbCrLf
  3309.  
  3310.    strDisplay = strDisplay & "RFill '" & Str1 & "' with '0' is " & vbCrLf
  3311.    strDisplay = strDisplay & cRFill(Str1, "0", 10) & vbCrLf & vbCrLf
  3312.  
  3313.    strDisplay = strDisplay & "RFill '" & Str1 & "' with '_' is " & vbCrLf
  3314.    strDisplay = strDisplay & cRFill(Str1, "_", 10) & vbCrLf & vbCrLf
  3315.  
  3316.    strDisplay = strDisplay & "RFill '" & Str1 & "' with '' is " & vbCrLf
  3317.    strDisplay = strDisplay & cRFill(Str1, "", 10) & vbCrLf & vbCrLf
  3318.  
  3319.    txt_Result = strDisplay
  3320.  
  3321.    'time the function
  3322.  
  3323.    TimerHandle = cTimerOpen()
  3324.    TimerStartOk = cTimerStart(TimerHandle)
  3325.    
  3326.    For i = 1 To Iteration
  3327.       strResult = cLFill(Str1, "0", 10)
  3328.    Next i
  3329.    
  3330.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  3331.    
  3332.    TimerCloseOk = cTimerClose(TimerHandle)
  3333.    
  3334. End Sub
  3335.  
  3336. Private Sub TestLRSetIn()
  3337.    
  3338.    Dim intResult        As Integer
  3339.    Dim strResult        As String
  3340.    Dim strDisplay       As String
  3341.    
  3342.    Dim i                As Integer
  3343.    
  3344.    Dim Str1             As String
  3345.   
  3346.    intResult = 0
  3347.    
  3348.    strResult = ""
  3349.    strDisplay = ""
  3350.      
  3351.    Str1 = Text1.Text
  3352.    
  3353.    strDisplay = strDisplay & "Insert '' on the left in block 5 into '" & Str1 & "' is " & vbCrLf
  3354.    strDisplay = strDisplay & cLSetIn(Str1, "/", 5, "") & vbCrLf & vbCrLf
  3355.  
  3356.    strDisplay = strDisplay & "Insert '*' on the left in block 1 into '" & Str1 & "' is " & vbCrLf
  3357.    strDisplay = strDisplay & cLSetIn(Str1, "/", 1, "*") & vbCrLf & vbCrLf
  3358.  
  3359.    strDisplay = strDisplay & "Insert '***' on the left in block 3 into '" & Str1 & "' is " & vbCrLf
  3360.    strDisplay = strDisplay & cLSetIn(Str1, "/", 3, "***") & vbCrLf & vbCrLf
  3361.  
  3362.    strDisplay = strDisplay & "Insert '*******' on the left in block 7 into '" & Str1 & "' is " & vbCrLf
  3363.    strDisplay = strDisplay & cLSetIn(Str1, "/", 7, "*******") & vbCrLf & vbCrLf
  3364.    
  3365.    strDisplay = strDisplay & vbCrLf & vbCrLf
  3366.  
  3367.    strDisplay = strDisplay & "Insert '' on the right in block 5 into '" & Str1 & "' is " & vbCrLf
  3368.    strDisplay = strDisplay & cRSetIn(Str1, "/", 5, "") & vbCrLf & vbCrLf
  3369.  
  3370.    strDisplay = strDisplay & "Insert '*' on the right in block 1 into '" & Str1 & "' is " & vbCrLf
  3371.    strDisplay = strDisplay & cRSetIn(Str1, "/", 1, "*") & vbCrLf & vbCrLf
  3372.  
  3373.    strDisplay = strDisplay & "Insert '***' on the right in block 3 into '" & Str1 & "' is " & vbCrLf
  3374.    strDisplay = strDisplay & cRSetIn(Str1, "/", 3, "***") & vbCrLf & vbCrLf
  3375.  
  3376.    strDisplay = strDisplay & "Insert '*******' on the right in block 7 into '" & Str1 & "' is " & vbCrLf
  3377.    strDisplay = strDisplay & cRSetIn(Str1, "/", 7, "*******") & vbCrLf & vbCrLf
  3378.  
  3379.    txt_Result = strDisplay
  3380.  
  3381.    'time the function
  3382.  
  3383.    TimerHandle = cTimerOpen()
  3384.    TimerStartOk = cTimerStart(TimerHandle)
  3385.    
  3386.    For i = 1 To Iteration
  3387.       strResult = cLSetIn(Str1, "/", 7, "*******")
  3388.    Next i
  3389.    
  3390.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  3391.    
  3392.    TimerCloseOk = cTimerClose(TimerHandle)
  3393.  
  3394. End Sub
  3395.  
  3396. Private Sub TestMatchTable()
  3397.  
  3398.    Dim intResult        As Integer
  3399.    Dim strResult        As String
  3400.    Dim strDisplay       As String
  3401.    
  3402.    Dim i                As Integer
  3403.    
  3404.    Dim Str1             As String
  3405.    Dim Str2             As String
  3406.    
  3407.    intResult = 0
  3408.    
  3409.    strResult = ""
  3410.    strDisplay = ""
  3411.      
  3412.    Str1 = Text1.Text
  3413.       
  3414.    strDisplay = strDisplay & "Match '' (case sensitive) in '" & Str1 & "' is " & vbCrLf
  3415.    strDisplay = strDisplay & cMatchTable("", Str1, "/", True) & vbCrLf & vbCrLf
  3416.    
  3417.    strDisplay = strDisplay & "Match 'bc' (case sensitive) in '" & Str1 & "' is " & vbCrLf
  3418.    strDisplay = strDisplay & cMatchTable("bc", Str1, "/", True) & vbCrLf & vbCrLf
  3419.    
  3420.    strDisplay = strDisplay & "Match 'bc' (case insensitive) in '" & Str1 & "' is " & vbCrLf
  3421.    strDisplay = strDisplay & cMatchTable("bc", Str1, "/", False) & vbCrLf & vbCrLf
  3422.    
  3423.    strDisplay = strDisplay & "Match 'BC' (case sensitive) in '" & Str1 & "' is " & vbCrLf
  3424.    strDisplay = strDisplay & cMatchTable("BC", Str1, "/", True) & vbCrLf & vbCrLf
  3425.    
  3426.    strDisplay = strDisplay & "Match 'BC' (case insensitive) in '" & Str1 & "' is " & vbCrLf
  3427.    strDisplay = strDisplay & cMatchTable("BC", Str1, "/", False) & vbCrLf & vbCrLf
  3428.    
  3429.    strDisplay = strDisplay & "Match 'abc' (case sensitive) in '" & Str1 & "' is " & vbCrLf
  3430.    strDisplay = strDisplay & cMatchTable("abc", Str1, "/", True) & vbCrLf & vbCrLf
  3431.    
  3432.    strDisplay = strDisplay & "Match 'abc' (case insensitive) in '" & Str1 & "' is " & vbCrLf
  3433.    strDisplay = strDisplay & cMatchTable("abc", Str1, "/", False) & vbCrLf & vbCrLf
  3434.    
  3435.    txt_Result = strDisplay
  3436.  
  3437.    'time the function
  3438.  
  3439.    Str1 = Text1.Text
  3440.    
  3441.    TimerHandle = cTimerOpen()
  3442.    TimerStartOk = cTimerStart(TimerHandle)
  3443.    
  3444.    For i = 1 To Iteration
  3445.       intResult = cMatchTable("klmnop", Str1, "/", True)
  3446.    Next i
  3447.    
  3448.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  3449.    
  3450.    TimerCloseOk = cTimerClose(TimerHandle)
  3451.  
  3452. End Sub
  3453.  
  3454. Private Sub TestInStr()
  3455.  
  3456.    Dim intResult        As Integer
  3457.    Dim strResult        As String
  3458.    Dim strDisplay       As String
  3459.    
  3460.    Dim i                As Integer
  3461.    
  3462.    Dim Str1             As String
  3463.    Dim Str2             As String
  3464.    
  3465.    intResult = 0
  3466.    
  3467.    strResult = ""
  3468.    strDisplay = ""
  3469.      
  3470.    Str1 = Text1.Text
  3471.       
  3472.    strDisplay = strDisplay & "Find '' (case sensitive) in '" & Str1 & "' is " & vbCrLf
  3473.    strDisplay = strDisplay & cInStr(1, Str1, "", True) & vbCrLf & vbCrLf
  3474.    
  3475.    strDisplay = strDisplay & "Find 'bc' (case sensitive) in '' is " & vbCrLf
  3476.    strDisplay = strDisplay & cInStr(1, "", "bc", True) & vbCrLf & vbCrLf
  3477.    
  3478.    strDisplay = strDisplay & "Find '' (case sensitive) in '' is " & vbCrLf
  3479.    strDisplay = strDisplay & cInStr(1, "", "", True) & vbCrLf & vbCrLf
  3480.    
  3481.    strDisplay = strDisplay & "Find 'bc' (case sensitive) in '" & Str1 & "' is " & vbCrLf
  3482.    strDisplay = strDisplay & cInStr(1, Str1, "bc", True) & vbCrLf & vbCrLf
  3483.    
  3484.    strDisplay = strDisplay & "Find 'bc' (case insensitive) in '" & Str1 & "' is " & vbCrLf
  3485.    strDisplay = strDisplay & cInStr(1, Str1, "bc", False) & vbCrLf & vbCrLf
  3486.    
  3487.    strDisplay = strDisplay & "Find 'bc' (case sensitive) from position 7 in '" & Str1 & "' is " & vbCrLf
  3488.    strDisplay = strDisplay & cInStr(7, Str1, "bc", True) & vbCrLf & vbCrLf
  3489.    
  3490.    strDisplay = strDisplay & "Find 'bc' (case insensitive) from position 7 in '" & Str1 & "' is " & vbCrLf
  3491.    strDisplay = strDisplay & cInStr(7, Str1, "bc", False) & vbCrLf & vbCrLf
  3492.    
  3493.    strDisplay = strDisplay & "Find 'BC' (case sensitive) in '" & Str1 & "' is " & vbCrLf
  3494.    strDisplay = strDisplay & cInStr(1, Str1, "BC", True) & vbCrLf & vbCrLf
  3495.    
  3496.    strDisplay = strDisplay & "Find 'BC' (case insensitive) in '" & Str1 & "' is " & vbCrLf
  3497.    strDisplay = strDisplay & cInStr(1, Str1, "BC", False) & vbCrLf & vbCrLf
  3498.    
  3499.    strDisplay = strDisplay & "Find 'BC' (case sensitive) from position 7 in '" & Str1 & "' is " & vbCrLf
  3500.    strDisplay = strDisplay & cInStr(7, Str1, "BC", True) & vbCrLf & vbCrLf
  3501.    
  3502.    strDisplay = strDisplay & "Find 'BC' (case insensitive) from position 7 in '" & Str1 & "' is " & vbCrLf
  3503.    strDisplay = strDisplay & cInStr(7, Str1, "BC", False) & vbCrLf & vbCrLf
  3504.    
  3505.    strDisplay = strDisplay & "Find 'BC' (case insensitive) from position 0 in '" & Str1 & "' is " & vbCrLf
  3506.    strDisplay = strDisplay & cInStr(0, Str1, "BC", False) & vbCrLf & vbCrLf
  3507.    
  3508.    txt_Result = strDisplay
  3509.  
  3510.    'time the function
  3511.  
  3512.    Str1 = Text1.Text
  3513.    
  3514.    TimerHandle = cTimerOpen()
  3515.    TimerStartOk = cTimerStart(TimerHandle)
  3516.    
  3517.    For i = 1 To Iteration
  3518.       intResult = cInStr(1, Str1, "klmnop", True)
  3519.    Next i
  3520.    
  3521.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  3522.    
  3523.    TimerCloseOk = cTimerClose(TimerHandle)
  3524.  
  3525. End Sub
  3526.  
  3527. Private Sub TestExtract()
  3528.  
  3529.    Dim intResult        As Integer
  3530.    Dim strResult        As String
  3531.    Dim strDisplay       As String
  3532.    
  3533.    Dim i                As Integer
  3534.    
  3535.    Dim Str1             As String
  3536.    Dim Str2             As String
  3537.    
  3538.    intResult = 0
  3539.    
  3540.    strResult = ""
  3541.    strDisplay = ""
  3542.      
  3543.    Str1 = Str1 + "Path: ourworld.compuserve.com/homepages/alpouda" & vbCrLf
  3544.    Str1 = Str1 + "From: time to win 32-bit" & vbCrLf
  3545.    Str1 = Str1 + "Newsgroups: comp.lang.basic.visual.misc" & vbCrLf
  3546.    Str1 = Str1 + "Subject: extract a sub-string with a key" & vbCrLf
  3547.    Str1 = Str1 + "Date: 17 Aug 1997 16:25:43 GMT" & vbCrLf
  3548.    Str1 = Str1 + "Organization: The M.C.R. Company" & vbCrLf
  3549.    Str1 = Str1 + "Lines: 25" & vbCrLf
  3550.    Str1 = Str1 + "Message-ID: <5t5u41$8ai$11@ourworld.compuserve.com>" & vbCrLf
  3551.    Str1 = Str1 + "NNTP-Posting-Host: ppp054.103.ourworld.compuserve.com" & vbCrLf
  3552.    Str1 = Str1 + "Post-Count: 000518" & vbCrLf
  3553.    Str1 = Str1 + "Xref: time to win 32-bit (v" & cGetVersion() & ")" & vbCrLf
  3554.       
  3555.    strDisplay = strDisplay & Str1 & vbCrLf
  3556.    
  3557.    strDisplay = strDisplay & "Extract data for the following key (field separator = Cr+Lf; sensitivity = True) :" & vbCrLf & vbCrLf
  3558.    
  3559.    strDisplay = strDisplay & "Path:" & vbCrLf & cExtract(Str1, "Path:", vbCrLf, True) & vbCrLf
  3560.    strDisplay = strDisplay & "From:" & vbCrLf & cExtract(Str1, "From:", vbCrLf, True) & vbCrLf
  3561.    strDisplay = strDisplay & "Newsgroups:" & vbCrLf & cExtract(Str1, "Newsgroups:", vbCrLf, True) & vbCrLf
  3562.    strDisplay = strDisplay & "Subject:" & vbCrLf & cExtract(Str1, "Subject:", vbCrLf, True) & vbCrLf
  3563.    strDisplay = strDisplay & "Organization:" & vbCrLf & cExtract(Str1, "Organization:", vbCrLf, True) & vbCrLf
  3564.    strDisplay = strDisplay & "Lines:" & vbCrLf & cExtract(Str1, "Lines:", vbCrLf, True) & vbCrLf
  3565.    strDisplay = strDisplay & "Message-ID:" & vbCrLf & cExtract(Str1, "Message-ID:", vbCrLf, True) & vbCrLf
  3566.    strDisplay = strDisplay & "NNTP-Posting-Host:" & vbCrLf & cExtract(Str1, "NNTP-Posting-Host:", vbCrLf, True) & vbCrLf
  3567.    strDisplay = strDisplay & "Post-Count:" & vbCrLf & cExtract(Str1, "Post-Count:", vbCrLf, True) & vbCrLf
  3568.    strDisplay = strDisplay & "Xref:" & vbCrLf & cExtract(Str1, "Xref:", vbCrLf, True) & vbCrLf & vbCrLf
  3569.    
  3570.    strDisplay = strDisplay & "Extract data for the following key (field separator = Cr+Lf; sensitivity = True) :" & vbCrLf & vbCrLf
  3571.    
  3572.    strDisplay = strDisplay & "From:" & vbCrLf & cExtract(Str1, "From:", vbCrLf, True) & vbCrLf
  3573.    strDisplay = strDisplay & "from:" & vbCrLf & cExtract(Str1, "from:", vbCrLf, True) & vbCrLf & vbCrLf
  3574.    
  3575.    strDisplay = strDisplay & "Extract data for the following key (field separator = Cr+Lf; sensitivity = False) :" & vbCrLf & vbCrLf
  3576.    
  3577.    strDisplay = strDisplay & "From:" & vbCrLf & cExtract(Str1, "From:", vbCrLf, False) & vbCrLf
  3578.    strDisplay = strDisplay & "from:" & vbCrLf & cExtract(Str1, "from:", vbCrLf, False) & vbCrLf & vbCrLf
  3579.    
  3580.    strDisplay = strDisplay & "Extract data for the following key (field separator = ""; sensitivity = False) :" & vbCrLf & vbCrLf
  3581.    
  3582.    strDisplay = strDisplay & "From:" & vbCrLf & cExtract(Str1, "From:", "", False) & vbCrLf
  3583.    strDisplay = strDisplay & "from:" & vbCrLf & cExtract(Str1, "from:", "", False) & vbCrLf
  3584.    
  3585.    txt_Result = strDisplay
  3586.  
  3587.    'time the function
  3588.  
  3589.    TimerHandle = cTimerOpen()
  3590.    TimerStartOk = cTimerStart(TimerHandle)
  3591.    
  3592.    For i = 1 To Iteration
  3593.       strResult = cExtract(Str1, "Path:", vbCrLf, True)
  3594.    Next i
  3595.    
  3596.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  3597.    
  3598.    TimerCloseOk = cTimerClose(TimerHandle)
  3599.  
  3600. End Sub
  3601.  
  3602. Private Sub TestExtractIsolate()
  3603.  
  3604.    Dim intResult        As Integer
  3605.    Dim strResult        As String
  3606.    Dim strDisplay       As String
  3607.    
  3608.    Dim i                As Integer
  3609.    
  3610.    Dim Str1             As String
  3611.    Dim Str2             As String
  3612.    
  3613.    intResult = 0
  3614.    
  3615.    strResult = ""
  3616.    strDisplay = ""
  3617.      
  3618.    Str1 = Str1 + "Path: ourworld.compuserve.com/homepages/alpouda" & vbCrLf
  3619.    Str1 = Str1 + "From: time to win 32-bit" & vbCrLf
  3620.    Str1 = Str1 + "Newsgroups: comp.lang.basic.visual.misc" & vbCrLf
  3621.    Str1 = Str1 + "" & vbCrLf
  3622.    Str1 = Str1 + "This is the body of the message" & vbCrLf
  3623.    Str1 = Str1 + "Nice DLL" & vbCrLf
  3624.       
  3625.    strDisplay = strDisplay & Str1 & vbCrLf
  3626.    
  3627.    strDisplay = strDisplay & "ExtractIsolate data for the following key (field separator = Cr+Lf; EXTRACT_ISOLATE_LEFT; sensitivity = True) :" & vbCrLf & vbCrLf
  3628.    
  3629.    strDisplay = strDisplay & "Path:" & vbCrLf & ">  " & cExtractIsolate(Str1, "Path:", vbCrLf, EXTRACT_ISOLATE_LEFT, True) & vbCrLf
  3630.    strDisplay = strDisplay & "From:" & vbCrLf & ">  " & cExtractIsolate(Str1, "From:", vbCrLf, EXTRACT_ISOLATE_LEFT, True) & vbCrLf
  3631.    strDisplay = strDisplay & "Newsgroups:" & vbCrLf & ">  " & cExtractIsolate(Str1, "Newsgroups:", vbCrLf, EXTRACT_ISOLATE_LEFT, True) & vbCrLf
  3632.    strDisplay = strDisplay & "''" & vbCrLf & ">  " & cExtractIsolate(Str1, "", vbCrLf, EXTRACT_ISOLATE_LEFT, True) & vbCrLf & vbCrLf
  3633.    
  3634.    strDisplay = strDisplay & "ExtractIsolate data for the following key (field separator = Cr+Lf; EXTRACT_ISOLATE_RIGHT; sensitivity = True) :" & vbCrLf & vbCrLf
  3635.    
  3636.    strDisplay = strDisplay & "Path:" & vbCrLf & ">  " & cExtractIsolate(Str1, "Path:", vbCrLf, EXTRACT_ISOLATE_RIGHT, True) & vbCrLf
  3637.    strDisplay = strDisplay & "From:" & vbCrLf & ">  " & cExtractIsolate(Str1, "From:", vbCrLf, EXTRACT_ISOLATE_RIGHT, True) & vbCrLf
  3638.    strDisplay = strDisplay & "Newsgroups:" & vbCrLf & ">  " & cExtractIsolate(Str1, "Newsgroups:", vbCrLf, EXTRACT_ISOLATE_RIGHT, True) & vbCrLf
  3639.    strDisplay = strDisplay & "''" & vbCrLf & ">  " & cExtractIsolate(Str1, "", vbCrLf, EXTRACT_ISOLATE_RIGHT, True) & vbCrLf & vbCrLf
  3640.    
  3641.    txt_Result = strDisplay
  3642.  
  3643.    'time the function
  3644.  
  3645.    TimerHandle = cTimerOpen()
  3646.    TimerStartOk = cTimerStart(TimerHandle)
  3647.    
  3648.    For i = 1 To Iteration
  3649.       strResult = cExtractIsolate(Str1, "", vbCrLf, EXTRACT_ISOLATE_RIGHT, True)
  3650.    Next i
  3651.    
  3652.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  3653.    
  3654.    TimerCloseOk = cTimerClose(TimerHandle)
  3655.  
  3656. End Sub
  3657.  
  3658.  
  3659.