Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove empty lines
#2
The following code always works. Is there a more concise way to write it?  Huh

The cause of issue #1 is that, in some cases, the line break is \r instead of \r\n.
 
Code:
Copy      Help
_s=
;Node,ReleaseDate,SMBIOSBIOSVersion
;
;Node,ReleaseDate,SMBIOSBIOSVersion
;
;DESKTOP-3URCFPT,20131216000000.000000+000,F1

str b=
;
;
;
_s.trim; _s.findreplace(b, "[]")

The problem is solved, but there might be a better way.  Smile

Code:
Copy      Help
_s.findreplace("[13][10][13][10]", "[]")
_s.findreplace("[13][13][10]", "[]")


Messages In This Thread
Remove empty lines - by Davider - 06-27-2025, 11:03 PM
RE: Remove empty lines - by Davider - 06-28-2025, 07:37 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)