Redmine#3454: simple text manipulation functions