Trimming newlines from a string

Pino Toscano toscano.pino at tiscali.it
Tue Mar 21 22:22:44 CET 2006


Hello,

finally, I'm subscribed too! :)

First mail, first question: imagine I have a string made by a newline 
character only, ie the line
message(STATUS "myvar: \"${myvar}\"")
would output
-- Found ...
-- myvar: "
"
-- Found ...
Doing a
STRING(REGEX REPLACE "\\n?\\r?" "" myvar "${myvar}")
have the result to make cmake output that the regexp matches an empty string.

Do you have any precious suggestion about sometimg that I'm missing?

Regards,

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20060321/3fcbfc6b/attachment.pgp 


More information about the Kde-buildsystem mailing list