![]() |
![]() |
|
|
|||||||
| Programmierung Rat & Tat für Programmierer |
|
|
Themen-Optionen | Ansicht |
|
|
#14 |
|
Inventar
![]() Registriert seit: 13.06.2001
Beiträge: 1.830
|
Mir ist gerade eine andere möglichkeit eingefallen:
Du suchst im String nach "(" und ")", machst String[] temp=input.substring(klammeraufposition,klammerzup osition).split(",",2); Damit hast du ein String[] temp float f; for (int i=0;i<temp.length;i++){ try{ f=Float.parseFloat(temp[i]) //mach irgendetwas mit f } catch (NumberFormatException e){} } Durch das parseFloat spart man sich das ganze suchen nach .,-,usw. Jak
____________________________________
Join the DNRC | Godwin\'s Law (thx@stona) Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing. \"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra) |
|
|
|
| Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
|
|