home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Power Pack / Visual_Basic4_Power_Pack.bin / vb4files / t2win_32 / _string.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-11-20  |  85.7 KB  |  2,028 lines

  1. VERSION 4.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     =   7785
  9.    Height          =   5640
  10.    Left            =   270
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   5235
  14.    ScaleWidth      =   7785
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2040
  17.    Width           =   7905
  18.    Begin VB.TextBox txt_Result 
  19.       BackColor       =   &H00C0C0C0&
  20.       BorderStyle     =   0  'None
  21.       Height          =   4005
  22.       Left            =   105
  23.       Locked          =   -1  'True
  24.       MultiLine       =   -1  'True
  25.       ScrollBars      =   2  'Vertical
  26.       TabIndex        =   8
  27.       Top             =   630
  28.       Width           =   7575
  29.    End
  30.    Begin Threed.SSPanel SSPanel1 
  31.       Align           =   1  'Align Top
  32.       Height          =   480
  33.       Left            =   0
  34.       TabIndex        =   0
  35.       Top             =   0
  36.       Width           =   7785
  37.       _Version        =   65536
  38.       _ExtentX        =   13732
  39.       _ExtentY        =   847
  40.       _StockProps     =   15
  41.       ForeColor       =   -2147483640
  42.       BackColor       =   12632256
  43.       Begin VB.ComboBox cmb_Function 
  44.          Height          =   315
  45.          Left            =   1365
  46.          TabIndex        =   1
  47.          Top             =   90
  48.          Width           =   5100
  49.       End
  50.       Begin Threed.SSCommand cmdNP 
  51.          Height          =   300
  52.          Index           =   1
  53.          Left            =   7455
  54.          TabIndex        =   10
  55.          Top             =   90
  56.          Width           =   255
  57.          _Version        =   65536
  58.          _ExtentX        =   450
  59.          _ExtentY        =   529
  60.          _StockProps     =   78
  61.          Caption         =   ">"
  62.          BevelWidth      =   1
  63.          Font3D          =   3
  64.          RoundedCorners  =   0   'False
  65.          Outline         =   0   'False
  66.       End
  67.       Begin Threed.SSCommand cmdNP 
  68.          Height          =   300
  69.          Index           =   0
  70.          Left            =   6615
  71.          TabIndex        =   9
  72.          Top             =   90
  73.          Width           =   255
  74.          _Version        =   65536
  75.          _ExtentX        =   450
  76.          _ExtentY        =   529
  77.          _StockProps     =   78
  78.          Caption         =   "<"
  79.          BevelWidth      =   1
  80.          Font3D          =   3
  81.          RoundedCorners  =   0   'False
  82.          Outline         =   0   'False
  83.       End
  84.       Begin VB.Label Label2 
  85.          Caption         =   "&Select a function"
  86.          Height          =   255
  87.          Left            =   90
  88.          TabIndex        =   3
  89.          Top             =   120
  90.          Width           =   1275
  91.       End
  92.       Begin Threed.SSCommand SSCommand1 
  93.          Default         =   -1  'True
  94.          Height          =   300
  95.          Left            =   6930
  96.          TabIndex        =   2
  97.          Top             =   90
  98.          Width           =   465
  99.          _Version        =   65536
  100.          _ExtentX        =   820
  101.          _ExtentY        =   529
  102.          _StockProps     =   78
  103.          Caption         =   "&Go"
  104.          BevelWidth      =   1
  105.          RoundedCorners  =   0   'False
  106.          Outline         =   0   'False
  107.       End
  108.    End
  109.    Begin Threed.SSPanel SSPanel2 
  110.       Align           =   2  'Align Bottom
  111.       Height          =   465
  112.       Left            =   0
  113.       TabIndex        =   4
  114.       Top             =   4770
  115.       Width           =   7785
  116.       _Version        =   65536
  117.       _ExtentX        =   13732
  118.       _ExtentY        =   820
  119.       _StockProps     =   15
  120.       BackColor       =   12632256
  121.       Begin VB.TextBox Text1 
  122.          Height          =   285
  123.          Left            =   1440
  124.          TabIndex        =   6
  125.          Tag             =   "A/BC/DEF/GHIJ/KLMNOP/"
  126.          Top             =   90
  127.          Width           =   5370
  128.       End
  129.       Begin Threed.SSCommand SSCommand2 
  130.          Height          =   285
  131.          Left            =   6885
  132.          TabIndex        =   7
  133.          Top             =   90
  134.          Width           =   825
  135.          _Version        =   65536
  136.          _ExtentX        =   1455
  137.          _ExtentY        =   503
  138.          _StockProps     =   78
  139.          Caption         =   "&Reset"
  140.          BevelWidth      =   1
  141.          Outline         =   0   'False
  142.       End
  143.       Begin VB.Label Label1 
  144.          Caption         =   "&Enter a test string"
  145.          Height          =   255
  146.          Left            =   90
  147.          TabIndex        =   5
  148.          Top             =   120
  149.          Width           =   1275
  150.       End
  151.    End
  152. Attribute VB_Name = "frmString"
  153. Attribute VB_Creatable = False
  154. Attribute VB_Exposed = False
  155. Option Explicit
  156. Option Base 1
  157. Private Const Iteration = 250
  158. Dim IsLoaded         As Integer
  159. Dim TimerStartOk     As Integer
  160. Dim TimerCloseOk     As Integer
  161. Dim TimerHandle      As Integer
  162. Dim TimerValue       As Long
  163. Private Sub cmdNP_Click(Index As Integer)
  164.    Call sub_NextPrev(cmb_Function, Index)
  165. End Sub
  166. Private Sub cmb_Function_Click()
  167.    If (IsLoaded = False) Then Exit Sub
  168.    Call cDisableFI(mdiT2W.Picture1)
  169.    SSPanel2.Visible = True
  170.    txt_Result = ""
  171.    DoEvents
  172.    Select Case cmb_Function.ListIndex
  173.       Case 0
  174.          Call TestOneCharFromLeft
  175.       Case 1
  176.          Call TestOneCharFromRight
  177.       Case 2
  178.          Call TestBlockCharFromLeft
  179.       Case 3
  180.          Call TestBlockCharFromRight
  181.       Case 4
  182.          Call TestGetIn
  183.       Case 5
  184.          Call TestGetInR
  185.       Case 6
  186.          Call TestGetInPart
  187.       Case 7
  188.          Call TestGetInPartR
  189.       Case 8
  190.          Call TestGetBlock
  191.       Case 9
  192.          Call TestInsertChars
  193.       Case 10
  194.          Call TestInsertByMask
  195.       Case 11
  196.          Call TestInsertBlocks
  197.       Case 12
  198.          Call TestInsertBlocksBy
  199.       Case 13
  200.          Call TestRemoveOneChar
  201.       Case 14
  202.          Call TestRemoveBlockChar
  203.       Case 15
  204.          Call TestTokenIn
  205.       Case 16
  206.          SSPanel2.Visible = False
  207.          Call TestOrTokenX
  208.       Case 17
  209.          SSPanel2.Visible = False
  210.          Call TestAndTokenX
  211.       Case 18
  212.          Call TestReverse
  213.       Case 19
  214.          Call TestMixChars
  215.       Case 20
  216.          Call TestScrollX
  217.       Case 21
  218.          Call TestChangeChars
  219.       Case 22
  220.          Call TestChangeCharsUntil
  221.       Case 23
  222.          Call TestCheckChars
  223.       Case 24
  224.          Call TestFilterChars
  225.       Case 25
  226.          Call TestFilterNotChars
  227.       Case 26
  228.          Call TestFilterBlocks
  229.       Case 27
  230.          Call TestResizeString
  231.       Case 28
  232.          Call TestResizeStringAndFill
  233.       Case 29
  234.          Call TestCreateAndFill
  235.       Case 30
  236.          Call TestFill
  237.       Case 31
  238.          Call TestLrc
  239.       Case 32
  240.          Call TestCompress
  241.       Case 33
  242.          SSPanel2.Visible = False
  243.          Call TestCompressTab
  244.       Case 34
  245.          Call TestCompact
  246.       Case 35
  247.          Call TestAlign
  248.       Case 36
  249.          Call TestProperName
  250.       Case 37
  251.          Call TestProperName2
  252.       Case 38
  253.          Call TestStringSAR
  254.       Case 39
  255.          Call TestToHexa
  256.       Case 40
  257.          SSPanel2.Visible = False
  258.          Call TestRomanArabic
  259.       Case 41
  260.          Call TestAsciiEbcdic
  261.       Case 42
  262.          SSPanel2.Visible = False
  263.          Call TestPatternMatch
  264.       Case 43
  265.          SSPanel2.Visible = False
  266.          Call TestPatternExtMatch
  267.       Case 44
  268.          Call TestCheckNumericity
  269.       Case 45
  270.          Call TestAlphaDigit
  271.       Case 46
  272.          SSPanel2.Visible = False
  273.          Call TestH2X
  274.       Case 47
  275.          Call TestSortStr
  276.       Case 48
  277.          Call TestMorse
  278.    End Select
  279.    DoEvents
  280.    Call cEnableFI(mdiT2W.Picture1)
  281. End Sub
  282. Private Sub Form_Activate()
  283.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  284. End Sub
  285. Private Sub Form_Load()
  286.    IsLoaded = False
  287.    Show
  288.    Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1)
  289.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_string.t2w")
  290.    IsLoaded = True
  291. End Sub
  292. Private Sub SSCommand1_Click()
  293.    Call cmb_Function_Click
  294. End Sub
  295. Private Sub TestOneCharFromLeft()
  296.    Dim intResult        As Integer
  297.    Dim strResult        As String
  298.    Dim strDisplay       As String
  299.    Dim i                As Integer
  300.    Dim Str1             As String
  301.    intResult = 0
  302.    strResult = ""
  303.    strDisplay = ""
  304.      
  305.    Str1 = Text1.Text
  306.    strDisplay = strDisplay & "The 3,7,1,21,14 chars from left of '" & Str1 & "' are " & vbCrLf & vbCrLf
  307.    strDisplay = strDisplay & "03: '" & cOneCharFromLeft(Str1, 3) & "'" & vbCrLf
  308.    strDisplay = strDisplay & "07: '" & cOneCharFromLeft(Str1, 7) & "'" & vbCrLf
  309.    strDisplay = strDisplay & "01: '" & cOneCharFromLeft(Str1, 1) & "'" & vbCrLf
  310.    strDisplay = strDisplay & "21: '" & cOneCharFromLeft(Str1, 21) & "'" & vbCrLf
  311.    strDisplay = strDisplay & "14: '" & cOneCharFromLeft(Str1, 14) & "'" & vbCrLf
  312.    txt_Result = strDisplay
  313.    'time the function
  314.    TimerHandle = cTimerOpen()
  315.    TimerStartOk = cTimerStart(TimerHandle)
  316.    For i = 1 To Iteration
  317.       strResult = cOneCharFromLeft(Str1, 3)
  318.    Next i
  319.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  320.    TimerCloseOk = cTimerClose(TimerHandle)
  321. End Sub
  322. Private Sub SSCommand2_Click()
  323.    Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1)
  324.    Call SSCommand1_Click
  325. End Sub
  326. Private Sub TestOneCharFromRight()
  327.    Dim intResult        As Integer
  328.    Dim strResult        As String
  329.    Dim strDisplay       As String
  330.    Dim i                As Integer
  331.    Dim Str1             As String
  332.    intResult = 0
  333.    strResult = ""
  334.    strDisplay = ""
  335.      
  336.    Str1 = Text1.Text
  337.    strDisplay = strDisplay & "The 3,7,1,21,14 chars from right of '" & Str1 & "' are " & vbCrLf & vbCrLf
  338.    strDisplay = strDisplay & "03: '" & cOneCharFromRight(Str1, 3) & "'" & vbCrLf
  339.    strDisplay = strDisplay & "07: '" & cOneCharFromRight(Str1, 7) & "'" & vbCrLf
  340.    strDisplay = strDisplay & "01: '" & cOneCharFromRight(Str1, 1) & "'" & vbCrLf
  341.    strDisplay = strDisplay & "21: '" & cOneCharFromRight(Str1, 21) & "'" & vbCrLf
  342.    strDisplay = strDisplay & "14: '" & cOneCharFromRight(Str1, 14) & "'" & vbCrLf
  343.    txt_Result = strDisplay
  344.    'time the function
  345.    TimerHandle = cTimerOpen()
  346.    TimerStartOk = cTimerStart(TimerHandle)
  347.    For i = 1 To Iteration
  348.       strResult = cOneCharFromRight(Str1, 3)
  349.    Next i
  350.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  351.    TimerCloseOk = cTimerClose(TimerHandle)
  352. End Sub
  353. Private Sub TestBlockCharFromLeft()
  354.    Dim intResult        As Integer
  355.    Dim strResult        As String
  356.    Dim strDisplay       As String
  357.    Dim i                As Integer
  358.    Dim Str1             As String
  359.    intResult = 0
  360.    strResult = ""
  361.    strDisplay = ""
  362.      
  363.    Str1 = Text1.Text
  364.    strDisplay = strDisplay & "The 3,7,1,21,14 blocks from left of '" & Str1 & "' are " & vbCrLf & vbCrLf
  365.    strDisplay = strDisplay & "03: '" & cBlockCharFromLeft(Str1, 3) & "'" & vbCrLf
  366.    strDisplay = strDisplay & "07: '" & cBlockCharFromLeft(Str1, 7) & "'" & vbCrLf
  367.    strDisplay = strDisplay & "01: '" & cBlockCharFromLeft(Str1, 1) & "'" & vbCrLf
  368.    strDisplay = strDisplay & "21: '" & cBlockCharFromLeft(Str1, 21) & "'" & vbCrLf
  369.    strDisplay = strDisplay & "14: '" & cBlockCharFromLeft(Str1, 14) & "'" & vbCrLf
  370.    txt_Result = strDisplay
  371.    'time the function
  372.    TimerHandle = cTimerOpen()
  373.    TimerStartOk = cTimerStart(TimerHandle)
  374.    For i = 1 To Iteration
  375.       strResult = cBlockCharFromLeft(Str1, 3)
  376.    Next i
  377.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  378.    TimerCloseOk = cTimerClose(TimerHandle)
  379. End Sub
  380. Private Sub TestBlockCharFromRight()
  381.    Dim intResult        As Integer
  382.    Dim strResult        As String
  383.    Dim strDisplay       As String
  384.    Dim i                As Integer
  385.    Dim Str1             As String
  386.    intResult = 0
  387.    strResult = ""
  388.    strDisplay = ""
  389.      
  390.    Str1 = Text1.Text
  391.    strDisplay = strDisplay & "The 3,7,1,21,14 blocks from right of '" & Str1 & "' are " & vbCrLf & vbCrLf
  392.    strDisplay = strDisplay & "03: '" & cBlockCharFromRight(Str1, 3) & "'" & vbCrLf
  393.    strDisplay = strDisplay & "07: '" & cBlockCharFromRight(Str1, 7) & "'" & vbCrLf
  394.    strDisplay = strDisplay & "01: '" & cBlockCharFromRight(Str1, 1) & "'" & vbCrLf
  395.    strDisplay = strDisplay & "21: '" & cBlockCharFromRight(Str1, 21) & "'" & vbCrLf
  396.    strDisplay = strDisplay & "14: '" & cBlockCharFromRight(Str1, 14) & "'" & vbCrLf
  397.    txt_Result = strDisplay
  398.    'time the function
  399.    TimerHandle = cTimerOpen()
  400.    TimerStartOk = cTimerStart(TimerHandle)
  401.    For i = 1 To Iteration
  402.       strResult = cBlockCharFromRight(Str1, 3)
  403.    Next i
  404.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  405.    TimerCloseOk = cTimerClose(TimerHandle)
  406. End Sub
  407. Private Sub TestGetIn()
  408.    Dim intResult        As Integer
  409.    Dim strResult        As String
  410.    Dim strDisplay       As String
  411.    Dim i                As Integer
  412.    Dim Str1             As String
  413.    Dim Sep1             As String
  414.    intResult = 0
  415.    strResult = ""
  416.    strDisplay = ""
  417.      
  418.    Str1 = Text1.Text
  419.    Sep1 = "/"
  420.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  421.    strDisplay = strDisplay & "3: '" & cGetIn(Str1, Sep1, 3) & "'" & vbCrLf
  422.    strDisplay = strDisplay & "7: '" & cGetIn(Str1, Sep1, 7) & "'" & vbCrLf
  423.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf
  424.    strDisplay = strDisplay & "5: '" & cGetIn(Str1, Sep1, 5) & "'" & vbCrLf
  425.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf
  426.    strDisplay = strDisplay & "0: '" & cGetIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  427.    Sep1 = "G"
  428.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  429.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf
  430.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  431.    Sep1 = "g"
  432.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  433.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf
  434.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'"
  435.    txt_Result = strDisplay
  436.    'time the function
  437.    TimerHandle = cTimerOpen()
  438.    TimerStartOk = cTimerStart(TimerHandle)
  439.    For i = 1 To Iteration
  440.       strResult = cGetIn(Str1, Sep1, 3)
  441.    Next i
  442.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  443.    TimerCloseOk = cTimerClose(TimerHandle)
  444. End Sub
  445. Private Sub TestGetInR()
  446.    Dim intResult        As Integer
  447.    Dim strResult        As String
  448.    Dim strDisplay       As String
  449.    Dim i                As Integer
  450.    Dim Str1             As String
  451.    Dim Sep1             As String
  452.    intResult = 0
  453.    strResult = ""
  454.    strDisplay = ""
  455.      
  456.    Str1 = Text1.Text
  457.    Sep1 = "/"
  458.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  459.    strDisplay = strDisplay & "3: '" & cGetInR(Str1, Sep1, 3) & "'" & vbCrLf
  460.    strDisplay = strDisplay & "7: '" & cGetInR(Str1, Sep1, 7) & "'" & vbCrLf
  461.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf
  462.    strDisplay = strDisplay & "5: '" & cGetInR(Str1, Sep1, 5) & "'" & vbCrLf
  463.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf
  464.    strDisplay = strDisplay & "0: '" & cGetInR(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  465.    Sep1 = "G"
  466.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  467.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf
  468.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  469.    Sep1 = "g"
  470.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  471.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf
  472.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'"
  473.    txt_Result = strDisplay
  474.    'time the function
  475.    TimerHandle = cTimerOpen()
  476.    TimerStartOk = cTimerStart(TimerHandle)
  477.    For i = 1 To Iteration
  478.       strResult = cGetInR(Str1, Sep1, 3)
  479.    Next i
  480.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  481.    TimerCloseOk = cTimerClose(TimerHandle)
  482. End Sub
  483. Private Sub TestGetInPart()
  484.    Dim intResult        As Integer
  485.    Dim strResult        As String
  486.    Dim strDisplay       As String
  487.    Dim i                As Integer
  488.    Dim Str1             As String
  489.    Dim Sep1             As String
  490.    intResult = 0
  491.    strResult = ""
  492.    strDisplay = ""
  493.      
  494.    Str1 = Text1.Text
  495.    Sep1 = "/"
  496.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  497.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  498.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  499.    Sep1 = "G"
  500.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  501.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  502.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  503.    Sep1 = "g"
  504.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  505.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  506.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'"
  507.    txt_Result = strDisplay
  508.    'time the function
  509.    TimerHandle = cTimerOpen()
  510.    TimerStartOk = cTimerStart(TimerHandle)
  511.    For i = 1 To Iteration
  512.       strResult = cGetInPart(Str1, Sep1, True)
  513.    Next i
  514.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  515.    TimerCloseOk = cTimerClose(TimerHandle)
  516. End Sub
  517. Private Sub TestGetInPartR()
  518.    Dim intResult        As Integer
  519.    Dim strResult        As String
  520.    Dim strDisplay       As String
  521.    Dim i                As Integer
  522.    Dim Str1             As String
  523.    Dim Sep1             As String
  524.    intResult = 0
  525.    strResult = ""
  526.    strDisplay = ""
  527.      
  528.    Str1 = Text1.Text
  529.    Sep1 = "/"
  530.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  531.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  532.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  533.    Sep1 = "G"
  534.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  535.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  536.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  537.    Sep1 = "g"
  538.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  539.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  540.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'"
  541.    txt_Result = strDisplay
  542.    'time the function
  543.    TimerHandle = cTimerOpen()
  544.    TimerStartOk = cTimerStart(TimerHandle)
  545.    For i = 1 To Iteration
  546.       strResult = cGetInPartR(Str1, Sep1, True)
  547.    Next i
  548.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  549.    TimerCloseOk = cTimerClose(TimerHandle)
  550. End Sub
  551. Private Sub TestGetBlock()
  552.    Dim intResult        As Integer
  553.    Dim strResult        As String
  554.    Dim strDisplay       As String
  555.    Dim i                As Integer
  556.    Dim Str1             As String
  557.    Dim BlockSize        As Integer
  558.    intResult = 0
  559.    strResult = ""
  560.    strDisplay = ""
  561.      
  562.    Str1 = Text1.Text
  563.    BlockSize = 2
  564.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  565.    strDisplay = strDisplay & "3: '" & cGetBlock(Str1, 3, BlockSize) & "'" & vbCrLf
  566.    strDisplay = strDisplay & "7: '" & cGetBlock(Str1, 7, BlockSize) & "'" & vbCrLf
  567.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf
  568.    strDisplay = strDisplay & "5: '" & cGetBlock(Str1, 5, BlockSize) & "'" & vbCrLf
  569.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf
  570.    strDisplay = strDisplay & "0: '" & cGetBlock(Str1, 0, BlockSize) & "'" & vbCrLf & vbCrLf
  571.    BlockSize = 3
  572.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  573.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf
  574.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf & vbCrLf
  575.    BlockSize = 4
  576.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  577.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf
  578.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'"
  579.    txt_Result = strDisplay
  580.    'time the function
  581.    TimerHandle = cTimerOpen()
  582.    TimerStartOk = cTimerStart(TimerHandle)
  583.    For i = 1 To Iteration
  584.       strResult = cGetBlock(Str1, BlockSize, 3)
  585.    Next i
  586.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  587.    TimerCloseOk = cTimerClose(TimerHandle)
  588. End Sub
  589. Private Sub TestInsertChars()
  590.    Dim intResult        As Integer
  591.    Dim strResult        As String
  592.    Dim strDisplay       As String
  593.    Dim i                As Integer
  594.    Dim Str1             As String
  595.    intResult = 0
  596.    strResult = ""
  597.    strDisplay = ""
  598.      
  599.    Str1 = Text1.Text
  600.    strDisplay = strDisplay & "Insert 'a' from 7 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  601.    strDisplay = strDisplay & cInsertChars(Str1, 7, "a") & vbCrLf & vbCrLf
  602.    strDisplay = strDisplay & "Insert '10$' from 2 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  603.    strDisplay = strDisplay & cInsertChars(Str1, 2, "10$") & vbCrLf & vbCrLf
  604.    strDisplay = strDisplay & "Insert '@' from 21 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  605.    strDisplay = strDisplay & cInsertChars(Str1, 21, "@") & vbCrLf & vbCrLf
  606.    txt_Result = strDisplay
  607.    'time the function
  608.    TimerHandle = cTimerOpen()
  609.    TimerStartOk = cTimerStart(TimerHandle)
  610.    For i = 1 To Iteration
  611.       strResult = cInsertChars(Str1, 1, "a")
  612.    Next i
  613.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  614.    TimerCloseOk = cTimerClose(TimerHandle)
  615. End Sub
  616. Private Sub TestInsertByMask()
  617.    Dim intResult        As Integer
  618.    Dim strResult        As String
  619.    Dim strDisplay       As String
  620.    Dim i                As Integer
  621.    Dim Str1             As String
  622.    Dim Str2             As String
  623.    Dim Mask1            As String
  624.    intResult = 0
  625.    strResult = ""
  626.    strDisplay = ""
  627.      
  628.    Str1 = "Nr ## Price $###.##"
  629.    Str2 = "0705200"
  630.    Mask1 = "#"
  631.    strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  632.    strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf
  633.    Str1 = Text1.Text
  634.    Str2 = String(cCount(Str1, "/"), "*")
  635.    Mask1 = "/"
  636.    strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  637.    strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf
  638.    txt_Result = strDisplay
  639.    'time the function
  640.    TimerHandle = cTimerOpen()
  641.    TimerStartOk = cTimerStart(TimerHandle)
  642.    For i = 1 To Iteration
  643.       strResult = cInsertByMask(Str1, Mask1, Str2)
  644.    Next i
  645.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  646.    TimerCloseOk = cTimerClose(TimerHandle)
  647. End Sub
  648. Private Sub TestInsertBlocks()
  649.    Dim intResult        As Integer
  650.    Dim strResult        As String
  651.    Dim strDisplay       As String
  652.    Dim i                As Integer
  653.    Dim Str1             As String
  654.    Dim Str2             As String
  655.    intResult = 0
  656.    strResult = ""
  657.    strDisplay = ""
  658.      
  659.    Str1 = "A~BC~DEF~GHIJ~"
  660.    Str2 = "a~bc~def~ghij"
  661.    strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  662.    strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf
  663.    Str1 = "A~BC~DEF~GHIJ~"
  664.    Str2 = ""
  665.    strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  666.    strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf
  667.    txt_Result = strDisplay
  668.    'time the function
  669.    TimerHandle = cTimerOpen()
  670.    TimerStartOk = cTimerStart(TimerHandle)
  671.    For i = 1 To Iteration
  672.       strResult = cInsertBlocks(Str1, Str2)
  673.    Next i
  674.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  675.    TimerCloseOk = cTimerClose(TimerHandle)
  676. End Sub
  677. Public Sub TestInsertBlocksBy()
  678.    Dim intResult        As Integer
  679.    Dim strResult        As String
  680.    Dim strDisplay       As String
  681.    Dim i                As Integer
  682.    Dim Str1             As String
  683.    Dim Str2             As String
  684.    Dim Sep1             As String
  685.    intResult = 0
  686.    strResult = ""
  687.    strDisplay = ""
  688.      
  689.    Str1 = Text1.Text
  690.    Str2 = "a/bc/def/ghij"
  691.    Sep1 = "/"
  692.    strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  693.    strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf
  694.    Str1 = Text1.Text
  695.    Str2 = ""
  696.    strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  697.    strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf
  698.    txt_Result = strDisplay
  699.    'time the function
  700.    TimerHandle = cTimerOpen()
  701.    TimerStartOk = cTimerStart(TimerHandle)
  702.    For i = 1 To Iteration
  703.       strResult = cInsertBlocksBy(Str1, Str2, Sep1)
  704.    Next i
  705.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  706.    TimerCloseOk = cTimerClose(TimerHandle)
  707. End Sub
  708. Private Sub TestRemoveOneChar()
  709.    Dim intResult        As Integer
  710.    Dim strResult        As String
  711.    Dim strDisplay       As String
  712.    Dim i                As Integer
  713.    Dim Str1             As String
  714.    intResult = 0
  715.    strResult = ""
  716.    strDisplay = ""
  717.      
  718.    Str1 = Text1.Text
  719.    strDisplay = strDisplay & "Removing the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  720.    strDisplay = strDisplay & cRemoveOneChar(Str1, 7) & vbCrLf & vbCrLf
  721.    Str1 = Text1.Text
  722.    strDisplay = strDisplay & "Removing the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  723.    strDisplay = strDisplay & cRemoveOneChar(Str1, 21) & vbCrLf & vbCrLf
  724.    Str1 = Text1.Text
  725.    strDisplay = strDisplay & "Removing the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  726.    strDisplay = strDisplay & cRemoveOneChar(Str1, 14) & vbCrLf & vbCrLf
  727.    Str1 = Text1.Text
  728.    strDisplay = strDisplay & "Removing the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  729.    strDisplay = strDisplay & cRemoveOneChar(Str1, 0) & vbCrLf & vbCrLf
  730.    Str1 = Text1.Text
  731.    strDisplay = strDisplay & "Removing the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  732.    strDisplay = strDisplay & cRemoveOneChar(Str1, 1)
  733.    txt_Result = strDisplay
  734.    'time the function
  735.    Str1 = Text1.Text
  736.    TimerHandle = cTimerOpen()
  737.    TimerStartOk = cTimerStart(TimerHandle)
  738.    For i = 1 To Iteration
  739.       strResult = cRemoveOneChar(Str1, 7)
  740.    Next i
  741.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  742.    TimerCloseOk = cTimerClose(TimerHandle)
  743. End Sub
  744. Public Sub TestRemoveBlockChar()
  745.    Dim intResult        As Integer
  746.    Dim strResult        As String
  747.    Dim strDisplay       As String
  748.    Dim i                As Integer
  749.    Dim Str1             As String
  750.    intResult = 0
  751.    strResult = ""
  752.    strDisplay = ""
  753.      
  754.    Str1 = Text1.Text
  755.    strDisplay = strDisplay & "Removing 3 chars from the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  756.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 7, 3) & vbCrLf & vbCrLf
  757.    Str1 = Text1.Text
  758.    strDisplay = strDisplay & "Removing 2 chars from the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  759.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 21, 2) & vbCrLf & vbCrLf
  760.    Str1 = Text1.Text
  761.    strDisplay = strDisplay & "Removing 7 chars from the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  762.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 14, 7) & vbCrLf & vbCrLf
  763.    Str1 = Text1.Text
  764.    strDisplay = strDisplay & "Removing 14 chars from the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  765.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 0, 14) & vbCrLf & vbCrLf
  766.    Str1 = Text1.Text
  767.    strDisplay = strDisplay & "Removing 50 chars from the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  768.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 1, 50)
  769.    txt_Result = strDisplay
  770.    'time the function
  771.    Str1 = Text1.Text
  772.    TimerHandle = cTimerOpen()
  773.    TimerStartOk = cTimerStart(TimerHandle)
  774.    For i = 1 To Iteration
  775.       strResult = cRemoveBlockChar(Str1, 1, 1)
  776.    Next i
  777.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  778.    TimerCloseOk = cTimerClose(TimerHandle)
  779. End Sub
  780. Private Sub TestTokenIn()
  781.    Dim intResult        As Integer
  782.    Dim strResult        As String
  783.    Dim strDisplay       As String
  784.    Dim i                As Integer
  785.    Dim Str1             As String
  786.    Dim Sep1             As String
  787.    intResult = 0
  788.    strResult = ""
  789.    strDisplay = ""
  790.      
  791.    Str1 = Text1.Text
  792.    Sep1 = "/HM"
  793.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  794.    strDisplay = strDisplay & "3: '" & cTokenIn(Str1, Sep1, 3) & "'" & vbCrLf
  795.    strDisplay = strDisplay & "7: '" & cTokenIn(Str1, Sep1, 7) & "'" & vbCrLf
  796.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf
  797.    strDisplay = strDisplay & "5: '" & cTokenIn(Str1, Sep1, 5) & "'" & vbCrLf
  798.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf
  799.    strDisplay = strDisplay & "0: '" & cTokenIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  800.    Sep1 = "G"
  801.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  802.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf
  803.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  804.    Sep1 = "g"
  805.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  806.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf
  807.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'"
  808.    txt_Result = strDisplay
  809.    'time the function
  810.    TimerHandle = cTimerOpen()
  811.    TimerStartOk = cTimerStart(TimerHandle)
  812.    For i = 1 To Iteration
  813.       strResult = cTokenIn(Str1, Sep1, 3)
  814.    Next i
  815.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  816.    TimerCloseOk = cTimerClose(TimerHandle)
  817. End Sub
  818. Private Sub TestOrTokenX()
  819.    Dim intResult        As Integer
  820.    Dim strResult        As String
  821.    Dim strDisplay       As String
  822.    Dim i                As Integer
  823.    Dim Str1             As String
  824.    Dim Str2             As String
  825.    Dim Sep1             As String
  826.    intResult = 0
  827.    strResult = ""
  828.    strDisplay = ""
  829.    Sep1 = "\"
  830.      
  831.    Str1 = "FOX|OVER|THE"
  832.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  833.    strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  834.    Str1 = "quick|jumps|the"
  835.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  836.    strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  837.    Str1 = "FOX\OVER\THE"
  838.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  839.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  840.    Str1 = "quick\jumps\the"
  841.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  842.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  843.    Str1 = "FOX/OVER/THE"
  844.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  845.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  846.    Str1 = "quick\JUMPS\the"
  847.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  848.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  849.    Str1 = LCase$("quick\jumps\THE")
  850.    Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
  851.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  852.    txt_Result = strDisplay
  853.    'time the function
  854.    TimerHandle = cTimerOpen()
  855.    TimerStartOk = cTimerStart(TimerHandle)
  856.    For i = 1 To Iteration
  857.       strResult = cOrTokenIn(Str2, Str1, Sep1)
  858.    Next i
  859.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  860.    TimerCloseOk = cTimerClose(TimerHandle)
  861. End Sub
  862. Private Sub TestAndTokenX()
  863.    Dim intResult        As Integer
  864.    Dim strResult        As String
  865.    Dim strDisplay       As String
  866.    Dim i                As Integer
  867.    Dim Str1             As String
  868.    Dim Str2             As String
  869.    Dim Sep1             As String
  870.    intResult = 0
  871.    strResult = ""
  872.    strDisplay = ""
  873.      
  874.    Sep1 = "\"
  875.      
  876.    Str1 = "FOX|OVER|THE"
  877.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  878.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  879.    Str1 = "quick|jumps|the"
  880.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  881.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  882.    Str1 = "FOX\OVER\THE"
  883.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  884.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  885.    Str1 = "quick\jumps\the"
  886.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  887.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  888.    Str1 = "FOX/OVER/THE"
  889.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  890.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  891.    Str1 = "quick\JUMPS\the"
  892.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  893.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  894.    Str1 = LCase$("quick\jumps\THE")
  895.    Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
  896.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  897.    txt_Result = strDisplay
  898.    'time the function
  899.    TimerHandle = cTimerOpen()
  900.    TimerStartOk = cTimerStart(TimerHandle)
  901.    For i = 1 To Iteration
  902.       strResult = cOrTokenIn(Str2, Str1, Sep1)
  903.    Next i
  904.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  905.    TimerCloseOk = cTimerClose(TimerHandle)
  906. End Sub
  907. Private Sub TestReverse()
  908.    Dim intResult        As Integer
  909.    Dim strResult        As String
  910.    Dim strDisplay       As String
  911.    Dim i                As Integer
  912.    Dim Str1             As String
  913.    Dim Str2             As String
  914.    intResult = 0
  915.    strResult = ""
  916.    strDisplay = ""
  917.      
  918.    Str1 = Text1.Text
  919.    Str2 = cReverse(Str1)
  920.    strDisplay = strDisplay & "Reverse of '" & Str1 & "' is " & vbCrLf & vbCrLf
  921.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  922.    strDisplay = strDisplay & "Reverse of '" & Str2 & "' is " & vbCrLf & vbCrLf
  923.    strDisplay = strDisplay & cReverse(Str2) & vbCrLf & vbCrLf
  924.    txt_Result = strDisplay
  925.    'time the function
  926.    TimerHandle = cTimerOpen()
  927.    TimerStartOk = cTimerStart(TimerHandle)
  928.    For i = 1 To Iteration
  929.       strResult = cReverse(Str1)
  930.    Next i
  931.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  932.    TimerCloseOk = cTimerClose(TimerHandle)
  933. End Sub
  934. Private Sub TestMixChars()
  935.    Dim intResult        As Integer
  936.    Dim strResult        As String
  937.    Dim strDisplay       As String
  938.    Dim i                As Integer
  939.    Dim Str1             As String
  940.    Dim Str2             As String
  941.    intResult = 0
  942.    strResult = ""
  943.    strDisplay = ""
  944.      
  945.    Str1 = Text1.Text
  946.    Str2 = cMixChars(Str1)
  947.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  948.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  949.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  950.    strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf
  951.    Str1 = "TIME TO WIN (32-Bit)"
  952.    Str2 = cMixChars(Str1)
  953.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  954.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  955.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  956.    strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf
  957.    Str1 = "Under the sky, the sun lights"
  958.    Str2 = cMixChars(Str1)
  959.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  960.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  961.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  962.    strDisplay = strDisplay & cMixChars(Str2)
  963.    txt_Result = strDisplay
  964.    'time the function
  965.    TimerHandle = cTimerOpen()
  966.    TimerStartOk = cTimerStart(TimerHandle)
  967.    For i = 1 To Iteration
  968.       strResult = cMixChars(Str1)
  969.    Next i
  970.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  971.    TimerCloseOk = cTimerClose(TimerHandle)
  972. End Sub
  973. Private Sub TestScrollX()
  974.    Dim intResult        As Integer
  975.    Dim strResult        As String
  976.    Dim strDisplay       As String
  977.    Dim i                As Integer
  978.    Dim Str1             As String
  979.    Dim Str2             As String
  980.    intResult = 0
  981.    strResult = ""
  982.    strDisplay = ""
  983.      
  984.    Str1 = Text1.Text
  985.    Str2 = Text1.Text
  986.    strDisplay = strDisplay & "Scroll 7 times from left into '" & Str1 & "' is " & vbCrLf & vbCrLf
  987.    For i = 1 To 7
  988.       Str2 = cScrollL(Str2)
  989.       strDisplay = strDisplay & Str2 & vbCrLf
  990.    Next i
  991.    strDisplay = strDisplay & vbCrLf
  992.    Str1 = Text1.Text
  993.    Str2 = Text1.Text
  994.    strDisplay = strDisplay & "Scroll 7 times from right into '" & Str1 & "' is " & vbCrLf & vbCrLf
  995.    For i = 1 To 7
  996.       Str2 = cScrollR(Str2)
  997.       strDisplay = strDisplay & Str2 & vbCrLf
  998.    Next i
  999.    strDisplay = strDisplay & vbCrLf
  1000.    txt_Result = strDisplay
  1001.    'time the function
  1002.    TimerHandle = cTimerOpen()
  1003.    TimerStartOk = cTimerStart(TimerHandle)
  1004.    For i = 1 To Iteration
  1005.       strResult = cScrollL(Str1)
  1006.    Next i
  1007.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1008.    TimerCloseOk = cTimerClose(TimerHandle)
  1009. End Sub
  1010. Private Sub TestChangeChars()
  1011.    Dim intResult        As Integer
  1012.    Dim strResult        As String
  1013.    Dim strDisplay       As String
  1014.    Dim i                As Integer
  1015.    Dim Str1             As String
  1016.    intResult = 0
  1017.    strResult = ""
  1018.    strDisplay = ""
  1019.      
  1020.    Str1 = Text1.Text
  1021.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1022.    Call cChangeChars(Str1, "AZM", "qyc")
  1023.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1024.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1025.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1026.    Call cChangeChars(Str1, "AZM", "qyc")
  1027.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1028.    strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1029.    Call cChangeChars(Str1, "qyc", "+-*")
  1030.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1031.    txt_Result = strDisplay
  1032.    'time the function
  1033.    Str1 = Text1.Text
  1034.    TimerHandle = cTimerOpen()
  1035.    TimerStartOk = cTimerStart(TimerHandle)
  1036.    For i = 1 To Iteration
  1037.       Call cChangeChars(Str1, "AZM", "qyc")
  1038.    Next i
  1039.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1040.    TimerCloseOk = cTimerClose(TimerHandle)
  1041. End Sub
  1042. Private Sub TestChangeCharsUntil()
  1043.    Dim intResult        As Integer
  1044.    Dim strResult        As String
  1045.    Dim strDisplay       As String
  1046.    Dim i                As Integer
  1047.    Dim Str1             As String
  1048.    intResult = 0
  1049.    strResult = ""
  1050.    strDisplay = ""
  1051.      
  1052.    Str1 = Text1.Text
  1053.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1054.    Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1055.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1056.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1057.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1058.    Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1059.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1060.    strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1061.    Call cChangeCharsUntil(Str1, "qyc", "+-*", "N")
  1062.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1063.    txt_Result = strDisplay
  1064.    'time the function
  1065.    Str1 = Text1.Text
  1066.    TimerHandle = cTimerOpen()
  1067.    TimerStartOk = cTimerStart(TimerHandle)
  1068.    For i = 1 To Iteration
  1069.       Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1070.    Next i
  1071.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1072.    TimerCloseOk = cTimerClose(TimerHandle)
  1073. End Sub
  1074. Private Sub TestCheckChars()
  1075.    Dim intResult        As Integer
  1076.    Dim strResult        As String
  1077.    Dim strDisplay       As String
  1078.    Dim i                As Integer
  1079.    Dim Str1             As String
  1080.    intResult = 0
  1081.    strResult = ""
  1082.    strDisplay = ""
  1083.      
  1084.    Str1 = Text1.Text
  1085.    strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1086.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1087.    strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1088.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1089.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1090.    strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1091.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1092.    strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1093.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present")
  1094.    txt_Result = strDisplay
  1095.    'time the function
  1096.    Str1 = Text1.Text
  1097.    TimerHandle = cTimerOpen()
  1098.    TimerStartOk = cTimerStart(TimerHandle)
  1099.    For i = 1 To Iteration
  1100.       intResult = cCheckChars(Str1, "aZ")
  1101.    Next i
  1102.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1103.    TimerCloseOk = cTimerClose(TimerHandle)
  1104. End Sub
  1105. Private Sub TestFilterChars()
  1106.    Dim intResult        As Integer
  1107.    Dim strResult        As String
  1108.    Dim strDisplay       As String
  1109.    Dim i                As Integer
  1110.    Dim Str1             As String
  1111.    intResult = 0
  1112.    strResult = ""
  1113.    strDisplay = ""
  1114.      
  1115.    Str1 = Text1.Text
  1116.    strDisplay = strDisplay & "Filter 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1117.    strDisplay = strDisplay & cFilterChars(Str1, "B/") & vbCrLf & vbCrLf
  1118.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1119.    strDisplay = strDisplay & "Filter 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1120.    strDisplay = strDisplay & cFilterChars(Str1, "BY")
  1121.    txt_Result = strDisplay
  1122.    'time the function
  1123.    Str1 = Text1.Text
  1124.    TimerHandle = cTimerOpen()
  1125.    TimerStartOk = cTimerStart(TimerHandle)
  1126.    For i = 1 To Iteration
  1127.       strResult = cFilterChars(Str1, "B/")
  1128.    Next i
  1129.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1130.    TimerCloseOk = cTimerClose(TimerHandle)
  1131. End Sub
  1132. Private Sub TestFilterNotChars()
  1133.    Dim intResult        As Integer
  1134.    Dim strResult        As String
  1135.    Dim strDisplay       As String
  1136.    Dim i                As Integer
  1137.    Dim Str1             As String
  1138.    intResult = 0
  1139.    strResult = ""
  1140.    strDisplay = ""
  1141.      
  1142.    Str1 = Text1.Text
  1143.    strDisplay = strDisplay & "Filter not 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1144.    strDisplay = strDisplay & cFilterNotChars(Str1, "B/") & vbCrLf & vbCrLf
  1145.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1146.    strDisplay = strDisplay & "Filter not 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1147.    strDisplay = strDisplay & cFilterNotChars(Str1, "BY")
  1148.    txt_Result = strDisplay
  1149.    'time the function
  1150.    Str1 = Text1.Text
  1151.    TimerHandle = cTimerOpen()
  1152.    TimerStartOk = cTimerStart(TimerHandle)
  1153.    For i = 1 To Iteration
  1154.       strResult = cFilterNotChars(Str1, "B/")
  1155.    Next i
  1156.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1157.    TimerCloseOk = cTimerClose(TimerHandle)
  1158. End Sub
  1159. Private Sub TestFilterBlocks()
  1160.    Dim intResult        As Integer
  1161.    Dim strResult        As String
  1162.    Dim strDisplay       As String
  1163.    Dim i                As Integer
  1164.    Dim Str1             As String
  1165.    intResult = 0
  1166.    strResult = ""
  1167.    strDisplay = ""
  1168.      
  1169.    Str1 = Text1.Text
  1170.    strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1171.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf
  1172.    strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1173.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'" & vbCrLf & vbCrLf
  1174.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1175.    strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1176.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf
  1177.    strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1178.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'"
  1179.    txt_Result = strDisplay
  1180.    'time the function
  1181.    Str1 = Text1.Text
  1182.    TimerHandle = cTimerOpen()
  1183.    TimerStartOk = cTimerStart(TimerHandle)
  1184.    For i = 1 To Iteration
  1185.       strResult = cFilterBlocks(Str1, "BI")
  1186.    Next i
  1187.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1188.    TimerCloseOk = cTimerClose(TimerHandle)
  1189. End Sub
  1190. Private Sub TestResizeString()
  1191.    Dim intResult        As Integer
  1192.    Dim strResult        As String
  1193.    Dim strDisplay       As String
  1194.    Dim i                As Integer
  1195.    Dim Str1             As String
  1196.    intResult = 0
  1197.    strResult = ""
  1198.    strDisplay = ""
  1199.      
  1200.    Str1 = Text1.Text
  1201.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1202.    strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf
  1203.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1204.    strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf
  1205.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1206.    strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf
  1207.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1208.    strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'" & vbCrLf & vbCrLf
  1209.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1210.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1211.    strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf
  1212.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1213.    strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf
  1214.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1215.    strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf
  1216.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1217.    strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'"
  1218.    txt_Result = strDisplay
  1219.    'time the function
  1220.    Str1 = Text1.Text
  1221.    TimerHandle = cTimerOpen()
  1222.    TimerStartOk = cTimerStart(TimerHandle)
  1223.    For i = 1 To Iteration
  1224.       strResult = cResizeString(Str1, 5)
  1225.    Next i
  1226.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1227.    TimerCloseOk = cTimerClose(TimerHandle)
  1228. End Sub
  1229. Private Sub TestResizeStringAndFill()
  1230.    Dim intResult        As Integer
  1231.    Dim strResult        As String
  1232.    Dim strDisplay       As String
  1233.    Dim i                As Integer
  1234.    Dim Str1             As String
  1235.    intResult = 0
  1236.    strResult = ""
  1237.    strDisplay = ""
  1238.      
  1239.    Str1 = Text1.Text
  1240.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1241.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf
  1242.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1243.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf
  1244.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1245.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf
  1246.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1247.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'" & vbCrLf & vbCrLf
  1248.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1249.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1250.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf
  1251.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1252.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf
  1253.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1254.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf
  1255.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1256.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'"
  1257.    txt_Result = strDisplay
  1258.    'time the function
  1259.    Str1 = Text1.Text
  1260.    TimerHandle = cTimerOpen()
  1261.    TimerStartOk = cTimerStart(TimerHandle)
  1262.    For i = 1 To Iteration
  1263.       strResult = cResizeStringAndFill(Str1, 50, "*")
  1264.    Next i
  1265.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1266.    TimerCloseOk = cTimerClose(TimerHandle)
  1267. End Sub
  1268. Private Sub TestCreateAndFill()
  1269.    Dim intResult        As Integer
  1270.    Dim strResult        As String
  1271.    Dim strDisplay       As String
  1272.    Dim i                As Integer
  1273.    Dim Str1             As String
  1274.    intResult = 0
  1275.    strResult = ""
  1276.    strDisplay = ""
  1277.      
  1278.    Str1 = Text1.Text
  1279.    strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1280.    strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf
  1281.    strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1282.    strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'" & vbCrLf & vbCrLf
  1283.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1284.    strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1285.    strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf
  1286.    strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1287.    strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'"
  1288.    txt_Result = strDisplay
  1289.    'time the function
  1290.    Str1 = Text1.Text
  1291.    TimerHandle = cTimerOpen()
  1292.    TimerStartOk = cTimerStart(TimerHandle)
  1293.    For i = 1 To Iteration
  1294.       strResult = cCreateAndFill(40, Str1)
  1295.    Next i
  1296.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1297.    TimerCloseOk = cTimerClose(TimerHandle)
  1298. End Sub
  1299. Private Sub TestFill()
  1300.    Dim intResult        As Integer
  1301.    Dim strResult        As String
  1302.    Dim strDisplay       As String
  1303.    Dim i                As Integer
  1304.    Dim Str1             As String
  1305.    intResult = 0
  1306.    strResult = ""
  1307.    strDisplay = ""
  1308.      
  1309.    Str1 = Text1.Text
  1310.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '*=' is " & vbCrLf & vbCrLf
  1311.    Call cFill(Str1, "*=")
  1312.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1313.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '=*=' is " & vbCrLf & vbCrLf
  1314.    Call cFill(Str1, "=*=")
  1315.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1316.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1317.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '7516' is " & vbCrLf & vbCrLf
  1318.    Call cFill(Str1, "7516")
  1319.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1320.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '$61.00' is " & vbCrLf & vbCrLf
  1321.    Call cFill(Str1, "$61.00")
  1322.    strDisplay = strDisplay & "'" & Str1 & "'"
  1323.    txt_Result = strDisplay
  1324.    'time the function
  1325.    Str1 = Text1.Text
  1326.    TimerHandle = cTimerOpen()
  1327.    TimerStartOk = cTimerStart(TimerHandle)
  1328.    For i = 1 To Iteration
  1329.       Call cFill(Str1, "*=")
  1330.    Next i
  1331.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1332.    TimerCloseOk = cTimerClose(TimerHandle)
  1333. End Sub
  1334. Private Sub TestLrc()
  1335.    Dim intResult        As Integer
  1336.    Dim strResult        As String
  1337.    Dim strDisplay       As String
  1338.    Dim i                As Integer
  1339.    Dim Str1             As String
  1340.    intResult = 0
  1341.    strResult = ""
  1342.    strDisplay = ""
  1343.      
  1344.    Str1 = Text1.Text
  1345.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf
  1346.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1347.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf
  1348.    Str1 = Chr$(2) & "0a12721536"
  1349.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'"
  1350.    txt_Result = strDisplay
  1351.    'time the function
  1352.    Str1 = Text1.Text
  1353.    TimerHandle = cTimerOpen()
  1354.    TimerStartOk = cTimerStart(TimerHandle)
  1355.    For i = 1 To Iteration
  1356.       strResult = cLrc(Str1)
  1357.    Next i
  1358.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1359.    TimerCloseOk = cTimerClose(TimerHandle)
  1360. End Sub
  1361. Private Sub TestCompress()
  1362.    Dim intResult        As Integer
  1363.    Dim strResult        As String
  1364.    Dim strDisplay       As String
  1365.    Dim i                As Integer
  1366.    Dim Str1             As String
  1367.    intResult = 0
  1368.    strResult = ""
  1369.    strDisplay = ""
  1370.      
  1371.    Str1 = Text1.Text
  1372.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1373.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  1374.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1375.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1376.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  1377.    Str1 = "A " & Chr$(9) & "BC  "
  1378.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1379.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  1380.    txt_Result = strDisplay
  1381.    'time the function
  1382.    Str1 = Text1.Text
  1383.    TimerHandle = cTimerOpen()
  1384.    TimerStartOk = cTimerStart(TimerHandle)
  1385.    For i = 1 To Iteration
  1386.       strResult = cCompress(Str1)
  1387.    Next i
  1388.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1389.    TimerCloseOk = cTimerClose(TimerHandle)
  1390. End Sub
  1391. Public Sub TestCompressTab()
  1392.    Dim intResult        As Integer
  1393.    Dim strResult        As String
  1394.    Dim strDisplay       As String
  1395.    Dim i                As Integer
  1396.    Dim Str1             As String
  1397.    Dim Str2             As String
  1398.    Dim Str3             As String
  1399.    intResult = 0
  1400.    strResult = ""
  1401.    strDisplay = ""
  1402.      
  1403.    Str1 = "A      BC   DEF  GHIJ  "
  1404.    For i = 1 To 6
  1405.       Str2 = cCompressTab(Str1, i)
  1406.       Str3 = Str2
  1407.       Call cChangeChars(Str3, vbTab, "
  1408.       strDisplay = strDisplay & "Compress tab (" & i & " chars) into '" & Str1 & "' is '" & Str3 & "'" & vbCrLf
  1409.       strDisplay = strDisplay & "Expand tab (" & i & " chars) into '" & Str3 & "' is '" & cExpandTab(Str2, i) & "'" & vbCrLf & vbCrLf
  1410.    Next i
  1411.    txt_Result = strDisplay
  1412.    'time the function
  1413.    Str1 = Text1.Text
  1414.    TimerHandle = cTimerOpen()
  1415.    TimerStartOk = cTimerStart(TimerHandle)
  1416.    For i = 1 To Iteration
  1417.       strResult = cCompressTab(Str1, 3)
  1418.    Next i
  1419.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1420.    TimerCloseOk = cTimerClose(TimerHandle)
  1421. End Sub
  1422. Private Sub TestCompact()
  1423.    Dim intResult        As Integer
  1424.    Dim strResult        As String
  1425.    Dim strDisplay       As String
  1426.    Dim i                As Integer
  1427.    Dim Str1             As String
  1428.    Dim Str2             As String
  1429.    intResult = 0
  1430.    strResult = ""
  1431.    strDisplay = ""
  1432.      
  1433.    Str1 = "987654321"
  1434.    Str2 = cCompact(Str1)
  1435.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  1436.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  1437.    Str1 = "1234567890"
  1438.    Str2 = cCompact(Str1)
  1439.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  1440.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  1441.    Str1 = Text1.Text
  1442.    Str2 = cCompact(Str1)
  1443.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  1444.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  1445.    txt_Result = strDisplay
  1446.    'time the function
  1447.    Str1 = Text1.Text
  1448.    TimerHandle = cTimerOpen()
  1449.    TimerStartOk = cTimerStart(TimerHandle)
  1450.    For i = 1 To Iteration
  1451.       strResult = cCompact(Str1)
  1452.    Next i
  1453.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1454.    TimerCloseOk = cTimerClose(TimerHandle)
  1455. End Sub
  1456. Private Sub TestAlign()
  1457.    Dim intResult        As Integer
  1458.    Dim strResult        As String
  1459.    Dim strDisplay       As String
  1460.    Dim i                As Integer
  1461.    Dim Str1             As String
  1462.    Dim Str2             As String
  1463.    intResult = 0
  1464.    strResult = ""
  1465.    strDisplay = ""
  1466.      
  1467.    Str1 = "T2WIN-32"
  1468.    strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1469.    strDisplay = strDisplay & "'" & cAlign(Str1, -1, 30) & "'" & vbCrLf & vbCrLf
  1470.    strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1471.    strDisplay = strDisplay & "'" & cAlign(Str1, 0, 30) & "'" & vbCrLf & vbCrLf
  1472.    strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1473.    strDisplay = strDisplay & "'" & cAlign(Str1, 1, 30) & "'" & vbCrLf & vbCrLf
  1474.    Str1 = Text1.Text
  1475.    strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1476.    strDisplay = strDisplay & "'" & cAlign(Str1, -1, 50) & "'" & vbCrLf & vbCrLf
  1477.    strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1478.    strDisplay = strDisplay & "'" & cAlign(Str1, 0, 50) & "'" & vbCrLf & vbCrLf
  1479.    strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1480.    strDisplay = strDisplay & "'" & cAlign(Str1, 1, 50) & "'"
  1481.    txt_Result = strDisplay
  1482.    'time the function
  1483.    Str1 = Text1.Text
  1484.    TimerHandle = cTimerOpen()
  1485.    TimerStartOk = cTimerStart(TimerHandle)
  1486.    For i = 1 To Iteration
  1487.       strResult = cAlign(Str1, 1, 30)
  1488.    Next i
  1489.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1490.    TimerCloseOk = cTimerClose(TimerHandle)
  1491. End Sub
  1492. Private Sub TestProperName()
  1493.    Dim intResult        As Integer
  1494.    Dim strResult        As String
  1495.    Dim strDisplay       As String
  1496.    Dim i                As Integer
  1497.    Dim Str1             As String
  1498.    Dim Str2             As String
  1499.    intResult = 0
  1500.    strResult = ""
  1501.    strDisplay = ""
  1502.      
  1503.    Str1 = Text1.Text
  1504.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  1505.    Str1 = "John fitz,jr"
  1506.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  1507.    Str1 = "john Fitz, jr"
  1508.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  1509.    Str1 = "macdonald"
  1510.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  1511.    Str1 = "mac donald"
  1512.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1)
  1513.                   
  1514.    txt_Result = strDisplay
  1515.    'time the function
  1516.    Str1 = Text1.Text
  1517.    TimerHandle = cTimerOpen()
  1518.    TimerStartOk = cTimerStart(TimerHandle)
  1519.    For i = 1 To Iteration
  1520.       strResult = cProperName(Str1)
  1521.    Next i
  1522.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1523.    TimerCloseOk = cTimerClose(TimerHandle)
  1524. End Sub
  1525. Private Sub TestProperName2()
  1526.    Dim intResult        As Integer
  1527.    Dim strResult        As String
  1528.    Dim strDisplay       As String
  1529.    Dim i                As Integer
  1530.    Dim Str1             As String
  1531.    Dim Str2             As String
  1532.    intResult = 0
  1533.    strResult = ""
  1534.    strDisplay = ""
  1535.      
  1536.    Str1 = Text1.Text
  1537.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  1538.    Str1 = "JOHN FITZ,JR"
  1539.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_UPPERCASE Or PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1540.    Str1 = "john Fitz,jr"
  1541.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1542.    Str1 = "macdonald"
  1543.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  1544.    Str1 = "mac donald"
  1545.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  1546.    Str1 = "a.l. greene jr."
  1547.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1548.    Str1 = "shale and sandstone and till"
  1549.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1550.    Str1 = "a sandstone or a shale"
  1551.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/or/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1552.    Str1 = "RR2 BARRHEAD"
  1553.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "rr2", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL) & "'" & vbCrLf & vbCrLf
  1554.    Str1 = "ANDY MACDONALD"
  1555.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "mac", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL Or PN_ONLY_LEADER_SPACE) & "'"
  1556.                   
  1557.    txt_Result = strDisplay
  1558.    'time the function
  1559.    Str1 = Text1.Text
  1560.    TimerHandle = cTimerOpen()
  1561.    TimerStartOk = cTimerStart(TimerHandle)
  1562.    For i = 1 To Iteration
  1563.       strResult = cProperName2(Str1, "", 0)
  1564.    Next i
  1565.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1566.    TimerCloseOk = cTimerClose(TimerHandle)
  1567. End Sub
  1568. Private Sub TestStringSAR()
  1569.    Dim intResult        As Integer
  1570.    Dim strResult        As String
  1571.    Dim strDisplay       As String
  1572.    Dim i                As Integer
  1573.    Dim Str1             As String
  1574.    Dim Str2             As String
  1575.    intResult = 0
  1576.    strResult = ""
  1577.    strDisplay = ""
  1578.      
  1579.    Str1 = "T2WIN-32, T2WIN-32, T2WIN-32, T2WIN-32 IS A DLL"
  1580.    Str2 = cStringSAR(Str1, "T2WIN-32", "t2win-32", False)
  1581.    strDisplay = strDisplay & "Replace 'T2WIN-32' by 't2win-32'" & vbCrLf
  1582.    strDisplay = strDisplay & "     in" & vbCrLf
  1583.    strDisplay = strDisplay & Str1 & vbCrLf
  1584.    strDisplay = strDisplay & "     is" & vbCrLf
  1585.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1586.    Str2 = cStringSAR(Str1, "2W", "IME TO W", True)
  1587.    strDisplay = strDisplay & "Replace '2W' by 'IME TO W'" & vbCrLf
  1588.    strDisplay = strDisplay & "     in" & vbCrLf
  1589.    strDisplay = strDisplay & Str1 & vbCrLf
  1590.    strDisplay = strDisplay & "     is" & vbCrLf
  1591.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1592.    Str2 = cStringSAR(Str1, "T2WIN-32", "", True)
  1593.    strDisplay = strDisplay & "Replace 'T2WIN-32, ' by ''" & vbCrLf
  1594.    strDisplay = strDisplay & "     in" & vbCrLf
  1595.    strDisplay = strDisplay & Str1 & vbCrLf
  1596.    strDisplay = strDisplay & "     is" & vbCrLf
  1597.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1598.    Str2 = cStringSAR(Str1, "I", "i", False)
  1599.    strDisplay = strDisplay & "Replace 'I' by 'i'" & vbCrLf
  1600.    strDisplay = strDisplay & "     in" & vbCrLf
  1601.    strDisplay = strDisplay & Str1 & vbCrLf
  1602.    strDisplay = strDisplay & "     is" & vbCrLf
  1603.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1604.    txt_Result = strDisplay
  1605.    'time the function
  1606.    Str1 = Text1.Text
  1607.    TimerHandle = cTimerOpen()
  1608.    TimerStartOk = cTimerStart(TimerHandle)
  1609.    For i = 1 To Iteration
  1610.       strResult = cStringSAR(Str1, "T2WIN-32", "t2win-32", False)
  1611.    Next i
  1612.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1613.    TimerCloseOk = cTimerClose(TimerHandle)
  1614. End Sub
  1615. Private Sub TestToHexa()
  1616.    Dim intResult        As Integer
  1617.    Dim strResult        As String
  1618.    Dim strDisplay       As String
  1619.    Dim i                As Integer
  1620.    Dim Str1             As String
  1621.    Dim Str2             As String
  1622.    intResult = 0
  1623.    strResult = ""
  1624.    strDisplay = ""
  1625.    Str1 = Text1.Text
  1626.    Str2 = cToHexa(Str1)
  1627.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1628.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1629.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1630.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf
  1631.    Str1 = "ABCDEFGH"
  1632.    Str2 = cToHexa(Str1)
  1633.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1634.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1635.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1636.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf
  1637.    Str1 = "01234567890"
  1638.    Str2 = cToHexa(Str1)
  1639.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1640.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1641.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1642.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'"
  1643.    txt_Result = strDisplay
  1644.    'time the function
  1645.    Str1 = Text1.Text
  1646.    TimerHandle = cTimerOpen()
  1647.    TimerStartOk = cTimerStart(TimerHandle)
  1648.    For i = 1 To Iteration
  1649.       strResult = cToHexa(Str1)
  1650.    Next i
  1651.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1652.    TimerCloseOk = cTimerClose(TimerHandle)
  1653. End Sub
  1654. Private Sub TestRomanArabic()
  1655.    Dim intResult        As Integer
  1656.    Dim strResult        As String
  1657.    Dim strDisplay       As String
  1658.    Dim i                As Integer
  1659.    Dim Str1             As String
  1660.    Dim Value            As Integer
  1661.    intResult = 0
  1662.    strResult = ""
  1663.    strDisplay = ""
  1664.    Str1 = UCase$(cArabicToRoman(Year(Int(Now))))
  1665.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  1666.    Str1 = UCase$(cArabicToRoman(Year(Int(Now)) - 1))
  1667.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  1668.    Str1 = UCase$(cArabicToRoman(Year(Int(Now)) + 1))
  1669.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  1670.    Value = Year(Int(Now))
  1671.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  1672.    Value = Year(Int(Now)) - 1
  1673.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  1674.    Value = Year(Int(Now)) + 1
  1675.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  1676.    txt_Result = strDisplay
  1677.    'time the function
  1678.    Str1 = Text1.Text
  1679.    TimerHandle = cTimerOpen()
  1680.    TimerStartOk = cTimerStart(TimerHandle)
  1681.    For i = 1 To Iteration
  1682.       strResult = cArabicToRoman(1996)
  1683.    Next i
  1684.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1685.    TimerCloseOk = cTimerClose(TimerHandle)
  1686. End Sub
  1687. Private Sub TestAsciiEbcdic()
  1688.    Dim intResult        As Integer
  1689.    Dim strResult        As String
  1690.    Dim strDisplay       As String
  1691.    Dim i                As Integer
  1692.    Dim Str1             As String
  1693.    Dim Str2             As String
  1694.    intResult = 0
  1695.    strResult = ""
  1696.    strDisplay = ""
  1697.    Str1 = Text1.Text
  1698.    Str2 = Str1
  1699.    Call cCnvASCIItoEBCDIC(Str2)
  1700.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1701.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1702.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1703.    Call cCnvEBCDICtoASCII(Str2)
  1704.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1705.    Str1 = "ABCDEFGH"
  1706.    Str2 = Str1
  1707.    Call cCnvASCIItoEBCDIC(Str2)
  1708.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1709.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1710.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1711.    Call cCnvEBCDICtoASCII(Str2)
  1712.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1713.    Str1 = "01234567890"
  1714.    Str2 = Str1
  1715.    Call cCnvASCIItoEBCDIC(Str2)
  1716.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1717.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1718.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1719.    Call cCnvEBCDICtoASCII(Str2)
  1720.    strDisplay = strDisplay & "'" & Str2 & "'"
  1721.    txt_Result = strDisplay
  1722.    'time the function
  1723.    Str1 = Text1.Text
  1724.    TimerHandle = cTimerOpen()
  1725.    TimerStartOk = cTimerStart(TimerHandle)
  1726.    For i = 1 To Iteration
  1727.       Call cCnvASCIItoEBCDIC(Str1)
  1728.    Next i
  1729.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1730.    TimerCloseOk = cTimerClose(TimerHandle)
  1731. End Sub
  1732. Private Sub TestPatternMatch()
  1733.    Dim intResult        As Integer
  1734.    Dim strResult        As String
  1735.    Dim strDisplay       As String
  1736.    Dim i                As Integer
  1737.    Dim Str1             As String
  1738.    Dim Str2             As String
  1739.    intResult = 0
  1740.    strResult = ""
  1741.    strDisplay = ""
  1742.    Str1 = "Under the blue sky, the sun lights"
  1743.    strDisplay = "PatternMatch '" & Str1 & "' with" & vbCrLf & vbCrLf
  1744.    Str2 = "*"
  1745.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1746.    Str2 = "*??*???*?"
  1747.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1748.    Str2 = "*Under*"
  1749.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1750.    Str2 = "*sky*"
  1751.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1752.    Str2 = "*lights"
  1753.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1754.    Str2 = "??der*sky*ligh??*"
  1755.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1756.    Str2 = "Under?the * s??,*"
  1757.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf
  1758.    Str2 = "*under*"
  1759.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1760.    Str2 = "Under*sun"
  1761.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1762.    Str2 = "Under t??e*"
  1763.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf
  1764.    txt_Result = strDisplay
  1765.    'time the function
  1766.    Str2 = "Under?the * s??,*"
  1767.    TimerHandle = cTimerOpen()
  1768.    TimerStartOk = cTimerStart(TimerHandle)
  1769.    For i = 1 To Iteration
  1770.       intResult = cPatternMatch(Str1, Str2)
  1771.    Next i
  1772.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1773.    TimerCloseOk = cTimerClose(TimerHandle)
  1774. End Sub
  1775. Private Sub TestPatternExtMatch()
  1776.    Dim intResult        As Integer
  1777.    Dim strResult        As String
  1778.    Dim strDisplay       As String
  1779.    Dim i                As Integer
  1780.    Dim Str1             As String
  1781.    Dim Str2             As String
  1782.    intResult = 0
  1783.    strResult = ""
  1784.    strDisplay = ""
  1785.    Str1 = "Under the blue sky, the sun lights"
  1786.    strDisplay = "PatternExtMatch '" & Str1 & "' with" & vbCrLf & vbCrLf
  1787.    Str2 = "*"
  1788.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1789.    Str2 = "*??*???*?"
  1790.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1791.    Str2 = "*Under*"
  1792.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1793.    Str2 = "*sky*"
  1794.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1795.    Str2 = "*lights"
  1796.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1797.    Str2 = "??der*sky*ligh??*"
  1798.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1799.    Str2 = "Under?the * s??,*"
  1800.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1801.    Str2 = "'U-U''a-z''a-z''a-z''a-z'?the *"
  1802.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1803.    Str2 = "'U-U''!A-Z''^A-Z''^A-Z''!A-Z'?the *'s-s'"
  1804.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1805.    Str2 = "~55~6E*~73"
  1806.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1807.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rstu'"
  1808.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1809.    Str2 = "Under?the *'~72~73~74~75'"
  1810.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf
  1811.    Str2 = "*under*"
  1812.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1813.    Str2 = "Under*sun"
  1814.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1815.    Str2 = "Under t??e*"
  1816.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1817.    Str2 = "'U-U''!a-z''^A-Z''^A-Z''!A-Z'?the *'!s-s'"
  1818.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1819.    Str2 = "~55~6G*~73"
  1820.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1821.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rStu'"
  1822.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1823.    Str2 = "Under?the *'~72~53~74~75'"
  1824.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf
  1825.    txt_Result = strDisplay
  1826.    'time the function
  1827.    Str2 = "Under?the * s??,*"
  1828.    TimerHandle = cTimerOpen()
  1829.    TimerStartOk = cTimerStart(TimerHandle)
  1830.    For i = 1 To Iteration
  1831.       intResult = cPatternExtMatch(Str1, Str2)
  1832.    Next i
  1833.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1834.    TimerCloseOk = cTimerClose(TimerHandle)
  1835. End Sub
  1836. Private Sub TestCheckNumericity()
  1837.    Dim intResult        As Integer
  1838.    Dim strResult        As String
  1839.    Dim strDisplay       As String
  1840.    Dim i                As Integer
  1841.    Dim Str1             As String
  1842.    intResult = 0
  1843.    strResult = ""
  1844.    strDisplay = ""
  1845.      
  1846.    Str1 = Text1.Text
  1847.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1848.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1849.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1850.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1851.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1852.    Str1 = "1234567890"
  1853.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1854.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1855.    Str1 = "-1234567890"
  1856.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1857.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1858.    Str1 = "+12345.67890"
  1859.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1860.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1861.    txt_Result = strDisplay
  1862.    'time the function
  1863.    Str1 = Text1.Text
  1864.    TimerHandle = cTimerOpen()
  1865.    TimerStartOk = cTimerStart(TimerHandle)
  1866.    For i = 1 To Iteration
  1867.       intResult = cCheckNumericity(Str1)
  1868.    Next i
  1869.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1870.    TimerCloseOk = cTimerClose(TimerHandle)
  1871. End Sub
  1872. Private Sub TestAlphaDigit()
  1873.    Dim intResult        As Integer
  1874.    Dim strResult        As String
  1875.    Dim strDisplay       As String
  1876.    Dim i                As Integer
  1877.    Dim Str1             As String
  1878.    intResult = 0
  1879.    strResult = ""
  1880.    strDisplay = ""
  1881.      
  1882.    Str1 = "1234567890"
  1883.    strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf
  1884.    strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf
  1885.    strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf
  1886.    strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'" & vbCrLf & vbCrLf & vbCrLf
  1887.    Str1 = Text1.Text
  1888.    strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf
  1889.    strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf
  1890.    strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf
  1891.    strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'"
  1892.    txt_Result = strDisplay
  1893.    'time the function
  1894.    Str1 = Text1.Text
  1895.    TimerHandle = cTimerOpen()
  1896.    TimerStartOk = cTimerStart(TimerHandle)
  1897.    For i = 1 To Iteration
  1898.       intResult = cAddDigit(Str1)
  1899.    Next i
  1900.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1901.    TimerCloseOk = cTimerClose(TimerHandle)
  1902. End Sub
  1903. Private Sub TestH2X()
  1904.    Dim intResult        As Integer
  1905.    Dim strResult        As String
  1906.    Dim strDisplay       As String
  1907.    Dim i                As Integer
  1908.    Dim Str1             As String
  1909.    intResult = 0
  1910.    strResult = ""
  1911.    strDisplay = ""
  1912.      
  1913.    strDisplay = "Hexa to Integer" & vbCrLf & vbCrLf
  1914.    Str1 = "0"
  1915.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1916.    Str1 = "1"
  1917.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1918.    Str1 = "A"
  1919.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1920.    Str1 = "A1"
  1921.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1922.    Str1 = "A1B"
  1923.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1924.    Str1 = "7FFF"
  1925.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1926.    Str1 = "A1B2"
  1927.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1928.    Str1 = "FFFF"
  1929.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf & vbCrLf
  1930.    strDisplay = strDisplay & "Hexa to Long" & vbCrLf & vbCrLf
  1931.    Str1 = "0"
  1932.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1933.    Str1 = "1"
  1934.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1935.    Str1 = "A"
  1936.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1937.    Str1 = "A1"
  1938.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1939.    Str1 = "A1B"
  1940.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1941.    Str1 = "A1B2"
  1942.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1943.    Str1 = "7FFFFFFF"
  1944.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1945.    Str1 = "B2A1A1B2"
  1946.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1947.    Str1 = "FFFFFFFF"
  1948.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf & vbCrLf
  1949.    txt_Result = strDisplay
  1950.    'time the function
  1951.    Str1 = Text1.Text
  1952.    TimerHandle = cTimerOpen()
  1953.    TimerStartOk = cTimerStart(TimerHandle)
  1954.    For i = 1 To Iteration
  1955.       intResult = cH2I(Str1)
  1956.    Next i
  1957.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1958.    TimerCloseOk = cTimerClose(TimerHandle)
  1959. End Sub
  1960. Private Sub TestSortStr()
  1961.    Dim intResult        As Integer
  1962.    Dim strResult        As String
  1963.    Dim strDisplay       As String
  1964.    Dim i                As Integer
  1965.    Dim Str1             As String
  1966.    intResult = 0
  1967.    strResult = ""
  1968.    strDisplay = ""
  1969.      
  1970.    Str1 = Text1.Text
  1971.    Str1 = cResizeStringAndFill(Str1, 60, " ")
  1972.    strDisplay = strDisplay & "SortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1973.    intResult = cSortStr(Str1, 20, 3)
  1974.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1975.    Str1 = "ABCBCABECAEB"
  1976.    strDisplay = strDisplay & "SortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1977.    intResult = cSortStr(Str1, 4, 3)
  1978.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf & vbCrLf
  1979.    Str1 = Text1.Text
  1980.    Str1 = cResizeStringAndFill(Str1, 60, " ")
  1981.    strDisplay = strDisplay & "ReverseSortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1982.    intResult = cReverseSortStr(Str1, 20, 3)
  1983.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1984.    Str1 = "ABCBCABECAEB"
  1985.    strDisplay = strDisplay & "ReverseSortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1986.    intResult = cReverseSortStr(Str1, 4, 3)
  1987.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1988.    txt_Result = strDisplay
  1989.    'time the function
  1990.    Str1 = Text1.Text
  1991.    TimerHandle = cTimerOpen()
  1992.    TimerStartOk = cTimerStart(TimerHandle)
  1993.    For i = 1 To Iteration
  1994.       strResult = cSortStr(Str1, 4, 3)
  1995.    Next i
  1996.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1997.    TimerCloseOk = cTimerClose(TimerHandle)
  1998. End Sub
  1999. Private Sub TestMorse()
  2000.    Dim intResult        As Integer
  2001.    Dim strResult        As String
  2002.    Dim strDisplay       As String
  2003.    Dim i                As Integer
  2004.    Dim Str1             As String
  2005.    intResult = 0
  2006.    strResult = ""
  2007.    strDisplay = ""
  2008.      
  2009.    Str1 = Text1.Text
  2010.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2011.    Str1 = "SOS"
  2012.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2013.    Str1 = "T2WIN-32"
  2014.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2015.    Str1 = "Nothing can beat the fox"
  2016.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2017.    txt_Result = strDisplay
  2018.    'time the function
  2019.    Str1 = Text1.Text
  2020.    TimerHandle = cTimerOpen()
  2021.    TimerStartOk = cTimerStart(TimerHandle)
  2022.    For i = 1 To Iteration
  2023.       strResult = cMorse(Str1)
  2024.    Next i
  2025.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2026.    TimerCloseOk = cTimerClose(TimerHandle)
  2027. End Sub
  2028.