Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    [java] stupidata - tokenizer + caratteri escape

    ho un tokenizer che come string delimiters dovrebbe avere punto interrogativa, avanzamento di riga e tab. Ho provato:
    st = new StringTokenizer(stringa,"?\n\t");
    ma non funzia. Cosa sbaglio?
    Walk fast, chew slowly.
    "We used students as subjects because rats are expensive and you get too attached to them"

  2. #2
    azzo mi sa che mi sono confuso, ho scritto che volevo come carattere l'avanzamento di riga intendendo come avanzamento di riga uno spazio bianco, la barra per intenderci, sto facendo una gran casino? Per il tab funziona.
    Walk fast, chew slowly.
    "We used students as subjects because rats are expensive and you get too attached to them"

  3. #3
    Per avere uno spazio bianco basta che inserisci
    new StringTokenizer(stringa,"?\n ");
    Lang=Java
    Ambiente = Eclipse forever
    Ubuntu & Win XP Pro

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.