RIGHT 函数 (VisioShapeSheet)RIGHT Function (VisioShapeSheet)

文本字符串,根据您指定的字符数中返回的最后一个字符。Returns the last character or characters in a text string, based on the number of characters you specify.

语法Syntax

右 (* 文本 * [,* * num_chars_opt * ])RIGHT(* text ** [, ** num_chars_opt ** ])

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data Type 说明Description
texttext
必需Required
字符串String
包含要提取的字符的文本字符串。The text string containing the characters you want to extract.
num_chars_optnum_chars_opt
可选Optional
编号Number
要提取的字符数。默认值为 1。The number of characters you want to extract. The default is 1.

返回值Return value

字符串String

说明Remarks

_Num_chars_opt_的值必须大于或等于零 (0)。The value of num_chars_opt must be greater than or equal to zero (0).

如果_num_chars_opt_大于 text 的长度,RIGHT 返回的所有文本。If num_chars_opt is greater than the length of the text, RIGHT returns all of the text. 如果省略_num_chars_opt_ ,则假定为 1。If num_chars_opt is omitted, it is assumed to be 1.

示例Example

RIGHT ("January 1, 2004", 4)RIGHT ("January 1, 2004", 4)

返回值 2004。Returns the value 2004.