MathTop

shift_string 函数

按带符号位移量循环移动文本字符。

语法

  • Shift(text, count)
  • shift_string(text, count)
  • string_shift(text, count)

参数与选项

text文本值,通常写在引号中。
count非负字符数量。

示例

  1. 左移文本Shift('abcdef', 2)返回 cdefab。
  2. 右移文本Shift('abcdef', -2)返回 efabcd。