mywiki:linux:linux_soding_style
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mywiki:linux:linux_soding_style [2014/10/22 22:09] – [Astyle] shaoguoh | mywiki:linux:linux_soding_style [2022/04/02 17:29] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| 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)
