delphi - Split strings with TStrings, omitting CRLF delimiter -



delphi - Split strings with TStrings, omitting CRLF delimiter -

i have string 'aaa'+#$0d+#$0a+'bbb'+#$01d+'ccc'. need split according #$1d character like:

'aaa'+#$0d+#$0a+'bbb' 'ccc'

i'm using function:

procedure split(delimiter: char; str: string; listofstrings: tstrings) ; begin listofstrings.clear; listofstrings.delimiter := delimiter; listofstrings.delimitedtext := str; listofstrings.strictdelimiter:= true; end; ... split(#$1d,'aaa'+#$0d+#$0a+'bbb'+#$01d+'ccc',sl);

unfortunately splits according crlf don't need.

how have strings spited #$1d?

you have set listofstrings.strictdelimiter:= true; before setting of property delimitedtext.

listofstrings.strictdelimiter:= true; listofstrings.delimitedtext := str;

delphi delphi-2007

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -