SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Jun 2006
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: is there any function like Replace to Place a character

    So you want to remove the dash "-"?

    Or you just want to compare the two numerical strings?

    Please tell us what you are trying to do.

  2. #2
    Member
    Join Date
    Jan 2006
    Location
    8343 priceton sq blvd e apt 1110, jacksonville fl 32256
    Posts
    81
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: is there any function like Replace to Place a character

    i want to add "-" into the string after two digits

  3. #3
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: is there any function like Replace to Place a character

    Why dont you remove the "-" from other string and then compare???

    If Replace("23-345645","-","")="23345645" then
    msgbox "equal"
    end if

  4. #4
    Member
    Join Date
    Jan 2006
    Location
    8343 priceton sq blvd e apt 1110, jacksonville fl 32256
    Posts
    81
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: is there any function like Replace to Place a character

    i put check point for other string using this string

  5. #5
    Member
    Join Date
    Jan 2006
    Location
    8343 priceton sq blvd e apt 1110, jacksonville fl 32256
    Posts
    81
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: is there any function like Replace to Place a character

    i put check point for web table and i have to compare the values wether displayed are not and
    i parameterised check point properties

    so i have to modify first string it self

  6. #6
    Senior Member
    Join Date
    Jan 2000
    Location
    USA, CA
    Posts
    1,998
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: is there any function like Replace to Place a character

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">' Return Value: Boolean
    ' True = String split successfully
    ' False = Unable to split string at designated position
    '
    ' Input Parameters: sInputString - string to be split
    ' iSplitPoint - number of characters to be splitted from the beginning of the sInputString
    '
    ' Output Parameters: sFirstPortion - Substring of the original string
    ' prior to the split point
    ' sRemainingPortion - Remaining substing of the
    ' original string
    '
    ' Note: Returns false if sInputString is empty or if iSplitPoint &lt; 0.
    '
    '

    Function SplitStringByIndex(ByVal sInputString, ByVal iSplitPoint, _
    ByRef sFirstPortion, ByRef sRemainingPortion)

    Dim bReturnValue, iInputStringLen
    bReturnValue = False

    iInputStringLen = Len(sInputString)

    If iSplitPoint &gt; 0 And iInputStringLen &gt; 0 Then
    If iSplitPoint &gt; iInputStringLen Then
    sFirstPortion = sInputString
    sRemainingPortion = &quot;&quot;
    ElseIf iSplitPoint = 1 Then
    sFirstPortion = &quot;&quot;
    sRemainingPortion = sInputString
    Else
    sFirstPortion = Left(sInputString, iSplitPoint)
    sRemainingPortion = Right(sInputString, (iInputStringLen - iSplitPoint))
    End If
    bReturnValue = True
    End If

    SplitStringByIndex = bReturnValue
    End Function 'SplitStringByIndex
    '
    '
    Using:
    If (SplitStringByIndex(&quot;1234&quot;, 2, sFirstPortion, sRemainingPortion)) Then
    MsgBox sFirstPortion
    MsgBox sRemainingPortion
    Else
    MsgBox &quot;Unable to split string at designated position&quot;
    End If
    '
    '
    Using in your case:
    If (SplitStringByIndex(&quot;23345645&quot;, 2, sFirstPortion, sRemainingPortion)) Then
    YourVariableForComparison = sFirstPortion &amp; - &amp; sRemainingPortion
    Else
    MsgBox &quot;Unable to parse innitial string&quot;
    End If</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Janna

  7. #7
    Member
    Join Date
    Jan 2006
    Location
    8343 priceton sq blvd e apt 1110, jacksonville fl 32256
    Posts
    81
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    is there any function like Replace to Place a character

    my string is 23345645 in display page it displays like 23-345645 i have to compare that with this

  8. #8
    Member
    Join Date
    Jan 2006
    Location
    8343 priceton sq blvd e apt 1110, jacksonville fl 32256
    Posts
    81
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: is there any function like Replace to Place a character

    thank janna its working
    is this working for string 234567890 to 234-567-890
    imean for all places where we want to insert some character

  9. #9
    Senior Member
    Join Date
    Jan 2000
    Location
    USA, CA
    Posts
    1,998
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: is there any function like Replace to Place a character

    Need to modified a little.
    Please, feel free to do that :-}

    Janna

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:48 PM.

Copyright BetaSoft Inc.