[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

[Java] læse \n ind



Jeg har en lille programstump som skal kunne skrive Strings efterfulgt af
en delimiter.
Ofte vil denne delimiter være newline, men den kan være en hvilken som
helst streng, så det skal være konfigurerbart.
Så jeg læser delimiteren ind fra fil.
Her er problemet så at hvis jeg i filen har stående f.eks. delim="\r\n",
så kommer der i den indlæste delimiter String til at stå bogstaveligt
"\r\n" (altså "backslash r backslash n").

Er der nogen måde jeg kan undgå det på?
Eller er der en smart måde at rette det tilbage til newline uden brug af
regexp eller String.replaceAll (fordi det skal kunne køre på 1.3)?

Mvh Rasmus



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *