diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-07-10 09:47:34 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-07-10 09:47:34 +0000 |
commit | 8299df966a58236b31c0028fd7ce799c4ac6e625 (patch) | |
tree | 09250c8a4c22a4fb109a7b7a0265454b3c4d5bca /runtime/doc/eval.txt | |
parent | 325b7a2fb5b970b77f7b9ec28ba15eb794f6edf8 (diff) | |
download | vim-git-8299df966a58236b31c0028fd7ce799c4ac6e625.tar.gz |
updated for version 7.0007v7.0007
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r-- | runtime/doc/eval.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 45c015937..e51d37267 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -928,6 +928,8 @@ system( {expr}) String output of shell command {expr} tempname() String name for a temporary file tolower( {expr}) String the String {expr} switched to lowercase toupper( {expr}) String the String {expr} switched to uppercase +tr( {src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr} + to chars in {tostr} type( {name}) Number type of variable {name} virtcol( {expr}) Number screen column of cursor or mark visualmode( [expr]) String last visual mode used @@ -2608,6 +2610,20 @@ toupper({expr}) *toupper()* characters turned into uppercase (just like applying |gU| to the string). +tr({src}, {fromstr}, {tostr}) *tr()* + The result is a copy of the {src} string with all characters + which appear in {fromstr} replaced by the character in that + position in the {tostr} string. Thus the first character in + {fromstr} is translated into the first character in {tostr} + and so on. Exactly like the unix "tr" command. + This code also deals with multibyte characters properly. + + Examples: > + echo tr("hello there", "ht", "HT") +< returns "Hello THere" > + echo tr("<blob>", "<>", "{}") +< returns "{blob}" + type({expr}) *type()* The result is a Number: 0 if {expr} has the type Number |