home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 35 / hot35.iso / ficheros / LVB / T2W32543.ZIP / _STRING.FRM < prev    next >
Text File  |  1998-05-21  |  114KB  |  3,621 lines

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