Skip to content

Servicewall/string-group

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

abstract

一个专门对字符串进行分组的库。将包含各种类型字符的长串,分为包含单一类型的子串。

usage

对目标字符串进行分组,分为只包含汉字、字母、数字、其他字符的子串,这些子串可以合并,例如:

原文本: 用户名User123在2023年10月15日购买了iPhone15手机,价格为¥6999元

汉字子串:
  段 1: 用户名
  段 2: 在
  段 3: 年
  段 4: 月
  段 5: 日购买了
  段 6: 手机
  段 7: 价格为
  段 8: 元
字母子串:
  段 1: User
  段 2: iPhone
数字子串:
  段 1: 123
  段 2: 2023
  段 3: 10
  段 4: 15
  段 5: 15
  段 6: 6999
其他子串:
  段 1: ,
  段 2: ¥

演示合并功能:
数字和其他字符合并(连续区间):
  段 1: 123
  段 2: 2023
  段 3: 10
  段 4: 15
  段 5: 15
  段 6: ,
  段 7: ¥6999
除汉字外所有分组合并(连续区间):
  段 1: User123
  段 2: 2023
  段 3: 10
  段 4: 15
  段 5: iPhone15
  段 6: ,
  段 7: ¥6999

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages