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
Post a Comment