Skip to content
On this page

left ​

获取字符串中指定子串左侧的部分

python
from usepy import left

参数 ​

  • original_str: 原始字符串
  • end_str: 结束子串

例子 ​

python
>>> left('abc123def', 'def')
'abc123'

Released under the MIT License.