Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. A string problem..

A string problem..

Scheduled Pinned Locked Moved Web Development
javascriptadobehelpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Monisankar
    wrote on last edited by
    #1

    Actually i am doing a program in JSFL(Flash Javascript).So i posted the thread here and it's a basic problem. Suppose, string = 'welcome to moni\'s homepage' var i = string.indexOf("\'"); var j = string.indexOf("\'",j); valueOfString = string.substring(i+1, j); now valueOfString is welcome to moni but i need to return it as welcome to moni's homepage. What should i do?Thanks

    J K 2 Replies Last reply
    0
    • M Monisankar

      Actually i am doing a program in JSFL(Flash Javascript).So i posted the thread here and it's a basic problem. Suppose, string = 'welcome to moni\'s homepage' var i = string.indexOf("\'"); var j = string.indexOf("\'",j); valueOfString = string.substring(i+1, j); now valueOfString is welcome to moni but i need to return it as welcome to moni's homepage. What should i do?Thanks

      J Offline
      J Offline
      Jeff Martin
      wrote on last edited by
      #2

      You need a replace function, not a substring function. Probably string.replace("\", "") Jeff Martin My Blog

      1 Reply Last reply
      0
      • M Monisankar

        Actually i am doing a program in JSFL(Flash Javascript).So i posted the thread here and it's a basic problem. Suppose, string = 'welcome to moni\'s homepage' var i = string.indexOf("\'"); var j = string.indexOf("\'",j); valueOfString = string.substring(i+1, j); now valueOfString is welcome to moni but i need to return it as welcome to moni's homepage. What should i do?Thanks

        K Offline
        K Offline
        kutz9
        wrote on last edited by
        #3

        Monisankar wrote: Actually i am doing a program in JSFL(Flash Javascript).So i posted the thread here and it's a basic problem. Suppose, string = 'welcome to moni\'s homepage' var i = string.indexOf("\'"); var j = string.indexOf("\'",j); valueOfString = string.substring(i+1, j); now valueOfString is welcome to moni but i need to return it as welcome to moni's homepage. What should i do?Thanks As said, in the previous reply to your question you either need a replace method, or you need to add on the end of the string to the current one. Ie. valueOfString = string.substring(i+1,j) + string.substring(j+1,stringLength) I don't know what the string length function in JSFL though... _____________________ Don't take out the Magic Pen, Don't draw on the Infinity Board - Neil Young

        M 1 Reply Last reply
        0
        • K kutz9

          Monisankar wrote: Actually i am doing a program in JSFL(Flash Javascript).So i posted the thread here and it's a basic problem. Suppose, string = 'welcome to moni\'s homepage' var i = string.indexOf("\'"); var j = string.indexOf("\'",j); valueOfString = string.substring(i+1, j); now valueOfString is welcome to moni but i need to return it as welcome to moni's homepage. What should i do?Thanks As said, in the previous reply to your question you either need a replace method, or you need to add on the end of the string to the current one. Ie. valueOfString = string.substring(i+1,j) + string.substring(j+1,stringLength) I don't know what the string length function in JSFL though... _____________________ Don't take out the Magic Pen, Don't draw on the Infinity Board - Neil Young

          M Offline
          M Offline
          Monisankar
          wrote on last edited by
          #4

          Thanks to both of u. Got it and solved. Thanks

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups