characters方法

characters(start_index, length)

返回一个 Characters 对象,该对象表示注释文本中的 characters 范围。

返回

字符对象。

def characters(self, start_index, length):
    ...
范围 类型 描述
start_index int 字符开始的索引。
length int 字符数。

例子


fontSetting = comment1.characters(0, 4)

也可以看看