mywiki:linux:linux_soding_style
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mywiki:linux:linux_soding_style [2014/10/22 22:09] – [Astyle] shaoguoh | mywiki:linux:linux_soding_style [2014/10/22 22:11] (current) – shaoguoh | ||
|---|---|---|---|
| Line 200: | Line 200: | ||
| for example: **char* p** becomes **char *p** | for example: **char* p** becomes **char *p** | ||
| + | ===== Perl/Bash ===== | ||
| + | Use perl to remove trailing whitespace in a string: | ||
| + | $str =~ s/\s+$//; | ||
| + | Take 1 or more white spaces (\s+) till the end of the string ($), and replace them with an empty string. | ||
mywiki/linux/linux_soding_style.1413986956.txt.gz · Last modified: (external edit)
