MathTop

string_border_array 函数

返回文本每个非空前缀的 border 长度。

语法

  • StringTools:-BorderArray(text)
  • BorderArray(text)
  • string_border_array(text)

参数与选项

text文本值,通常写在引号中。

示例

  1. Border 数组StringTools:-BorderArray('ababa')返回 [0, 0, 1, 2, 3]。