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