delphi - Make String into only 1 line -



delphi - Make String into only 1 line -

i have output paragraph , when seek search string substring, if substring split doesnt' work. how can create paragraph string 1 line?

example string:

i have output paragraph , when seek search string substring, if substring split doesn't work. how can create paragraph string 1 line?

substring: "it doesn't work"

when seek search substring, doesn't homecoming true.

it seems want treat newlines spaces. writing efficient search algorithms not trivial, approach works , answers question in title, is

str := stringreplace(str, slinebreak, ' ', [rfreplaceall]);

that is, replace linebreaks spaces. without magic constants, is

str := stringreplace(str, #13#10, #32, [rfreplaceall]);

perhaps there spaces between words, in add-on linebreaks? remove linebreaks, without adding spaces:

str := stringreplace(str, #13#10, '', [rfreplaceall]);

string delphi

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

ms access - C# - Using OleDbParameter on table name -