Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Selection chaine de caractère

1 réponse
Avatar
Jean-Laurent
Voila j'ai un fichier texte contenant différentes données, j'aurai
besoin d'écrire un code permettant de faire le tri de ce dont je n'ai
pas besoin. Ici j'aurai besoin seulement des données suivant les
différents "TTITLE". Si quelqu'un connait un moyen simple d'y
arriver...

Merci

201 zaphod CDDBP server v1.5.1PL2 ready at Sat Dec 31 10:23:28 2005
200 Hello and welcome toto@mamachine running freedb-beta 0.1.
210 misc d90c9510 CD database entry follows (until terminating `.')
# xmcd
#
# Track frame offsets:
# 150
# 13556
# 30853
# 44632
# 55281
# 71025
# 84536
# 106080
# 120654
# 137861
# 150127
# 168804
# 183075
# 188179
# 209033
# 223287
#
# Disc length: 3223 seconds
#
# Revision: 8
# Processed by: cddbd v1.5.1PL2 Copyright (c) Steve Scherf et al.
# Submitted via: ExactAudioCopy v0.95a3
#
DISCID=d90c9510
DTITLE=Ladytron / 604
TTITLE0=Mu-Tron
TTITLE1=Discotraxx
TTITLE2=Another Breakfast With You
TTITLE3=CSKA Sofia
TTITLE4=The Way That I Found You
TTITLE5=Paco!
TTITLE6=Commodore Rock
TTITLE7=Zmeyka
TTITLE8=Playgirl
TTITLE9=I'm With The Pilots
TTITLE10=This Is Our Sound
TTITLE11=He Took Her To A Movie
TTITLE12=Laughing Cavalier
TTITLE13=Ladybird
TTITLE14=Jet Age
TTITLE15=Skools Out...
EXTD=
EXTT0=

1 réponse

Avatar
Pierre Gilquin
lire chaque ligne dans une string ligneLu puis

if (ligneLu.startsWith("TITLE"))
{
int idx = ligneLu.indexOf("=");
String monTitre = ligneLu.substring(idx);
}

fait de memoire et pas testé !!

Pierre

"Jean-Laurent" a écrit dans le message de news:

Voila j'ai un fichier texte contenant différentes données, j'aurai besoin
d'écrire un code permettant de faire le tri de ce dont je n'ai pas besoin.
Ici j'aurai besoin seulement des données suivant les différents "TTITLE".
Si quelqu'un connait un moyen simple d'y arriver...

Merci

201 zaphod CDDBP server v1.5.1PL2 ready at Sat Dec 31 10:23:28 2005
200 Hello and welcome running freedb-beta 0.1.
210 misc d90c9510 CD database entry follows (until terminating `.')
# xmcd
#
# Track frame offsets:
# 150
# 13556
# 30853
# 44632
# 55281
# 71025
# 84536
# 106080
# 120654
# 137861
# 150127
# 168804
# 183075
# 188179
# 209033
# 223287
#
# Disc length: 3223 seconds
#
# Revision: 8
# Processed by: cddbd v1.5.1PL2 Copyright (c) Steve Scherf et al.
# Submitted via: ExactAudioCopy v0.95a3
#
DISCIDÙ0c9510
DTITLE=Ladytron / 604
TTITLE0=Mu-Tron
TTITLE1=Discotraxx
TTITLE2=Another Breakfast With You
TTITLE3=CSKA Sofia
TTITLE4=The Way That I Found You
TTITLE5=Paco!
TTITLE6=Commodore Rock
TTITLE7=Zmeyka
TTITLE8=Playgirl
TTITLE9=I'm With The Pilots
TTITLE10=This Is Our Sound
TTITLE11=He Took Her To A Movie
TTITLE12=Laughing Cavalier
TTITLE13=Ladybird
TTITLE14=Jet Age
TTITLE15=Skools Out...
EXTD > EXTT0 >