String manipulation...

Results 1 to 2 of 2

Thread: String manipulation...

  1. #1
    Join Date
    Dec 1969

    Default String manipulation...

    I have a string stored in a cookie...<BR><BR>It is basically the users email address and thier role in the system. like this...<BR><BR>< BR><BR> string searchWithinThis = "";<BR> string searchForThis = ":role:";<BR> int firstCharacter = searchWithinThis.IndexOf(searchForThis);<BR> Response.Write("First occurrence:" + firstCharacter);<BR><BR>What I need to do is to get the part that exists after :role:. I know how to get the indexof, I just don&#039;t know how to "use" it from there. Can someone point me in the right direction? Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: String manipulation...

    given what you ave done with your cookies<BR><BR>arrayofcookie = split(cookie("cookiename"), ":")<BR><BR>Assuming that the part you want is always last....<BR><BR>typeofrole = arrayofcookie(Ubound(arrayofcookie))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts