updated for version 7.0007
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user