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. General Programming
  3. C#
  4. java stringtokenizer in c#

java stringtokenizer in c#

Scheduled Pinned Locked Moved C#
csharpjava
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.
  • L Offline
    L Offline
    Legolas_Bilbao
    wrote on last edited by
    #1

    how can parser this string "casa-de-paco" in three differents strings "casa" "de" "paco" thanks

    Dios creo un equipo perfecto a los demas los lleno de extranjeros

    C 1 Reply Last reply
    0
    • L Legolas_Bilbao

      how can parser this string "casa-de-paco" in three differents strings "casa" "de" "paco" thanks

      Dios creo un equipo perfecto a los demas los lleno de extranjeros

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      I don't understand the referrence to Java, but this might be what you want:

      string original = "casa-de-paco";
      string tokens[] = original.Split('-');


      * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

      J 1 Reply Last reply
      0
      • C Colin Angus Mackay

        I don't understand the referrence to Java, but this might be what you want:

        string original = "casa-de-paco";
        string tokens[] = original.Split('-');


        * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

        J Offline
        J Offline
        Judah Gabriel Himango
        wrote on last edited by
        #3

        Colin Angus Mackay wrote:

        I don't understand the referrence to Java

        Java's StringTokenizer[^] object allows you to split strings into parts ("tokens"); I think he was looking for and equivalent. string.Split should work in this case, though, as you mention.

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Messianic Instrumentals (with audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

        L 1 Reply Last reply
        0
        • J Judah Gabriel Himango

          Colin Angus Mackay wrote:

          I don't understand the referrence to Java

          Java's StringTokenizer[^] object allows you to split strings into parts ("tokens"); I think he was looking for and equivalent. string.Split should work in this case, though, as you mention.

          Tech, life, family, faith: Give me a visit. I'm currently blogging about: Messianic Instrumentals (with audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

          L Offline
          L Offline
          Legolas_Bilbao
          wrote on last edited by
          #4

          thanks both

          Dios creo un equipo perfecto a los demas los lleno de extranjeros

          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