[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
 

Re: [PROGRAMMERING] [Java] læse \n ind



Rasmus Wätjen wrote:

(snip)
> 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)?

Nu har jeg ikke lige min bog ved hånden, men jeg mener du skal escape
backslash i en java string. Altså \\n for en newline.

Jeg tager muligvis fejl, men du kan jo prøve.

-- 
 Med venlig hilsen / Best regards
 B.Sc. Magnus Meinild
 Phone: (+45) 2257 1655
 Email: sslug@sslug



 
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] *