Mercurial > vim
comparison runtime/doc/eval.txt @ 13563:5923f64c8f5b
Update runtime files
commit https://github.com/vim/vim/commit/ab943431d8fcd856008a025b0e5652dd4b8007fc
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 29 18:27:07 2018 +0200
Update runtime files
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 29 Mar 2018 18:30:08 +0200 |
parents | 1fd0f8392946 |
children | ab89131d30e0 |
comparison
equal
deleted
inserted
replaced
13562:f4b3a1a1376f | 13563:5923f64c8f5b |
---|---|
1 *eval.txt* For Vim version 8.0. Last change: 2018 Mar 20 | 1 *eval.txt* For Vim version 8.0. Last change: 2018 Mar 23 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
8668 which includes Tab, space, NL and CR, plus the non-breaking | 8668 which includes Tab, space, NL and CR, plus the non-breaking |
8669 space character 0xa0. | 8669 space character 0xa0. |
8670 This code deals with multibyte characters properly. | 8670 This code deals with multibyte characters properly. |
8671 | 8671 |
8672 Examples: > | 8672 Examples: > |
8673 echo trim(" \r\t\t\r RESERVE \t \t\n\x0B\x0B")."_TAIL" | 8673 echo trim(" some text ") |
8674 < returns "some text" > | |
8675 echo trim(" \r\t\t\r RESERVE \t\n\x0B\xA0") . "_TAIL" | |
8674 < returns "RESERVE_TAIL" > | 8676 < returns "RESERVE_TAIL" > |
8675 echo trim("needrmvRESERVEnnneeedddrrmmmmvv", "ednmrv") | 8677 echo trim("rm<Xrm<>X>rrm", "rm<>") |
8676 < returns "RESERVE" > | 8678 < returns "Xrm<>X" (characters in the middle are not removed) |
8677 echo trim("rm<blob1><blob2><any_chars>rrmm<blob1><blob2><blob2>", "rm<blob1><blob2>") | |
8678 < returns "any_chas" | |
8679 | 8679 |
8680 trunc({expr}) *trunc()* | 8680 trunc({expr}) *trunc()* |
8681 Return the largest integral value with magnitude less than or | 8681 Return the largest integral value with magnitude less than or |
8682 equal to {expr} as a |Float| (truncate towards zero). | 8682 equal to {expr} as a |Float| (truncate towards zero). |
8683 {expr} must evaluate to a |Float| or a |Number|. | 8683 {expr} must evaluate to a |Float| or a |Number|. |