Skip to content

v1.0.0

Compare
Choose a tag to compare
@huacnlee huacnlee released this 27 Jul 04:27
· 13 commits to main since this release
  • Format, FormatHTML, Unformat, UnformatHTML support custom option for addition processes.

Example:

type myFormatter struct {}
func (my myFormatter) Format(text string) string {
  return strings.ReplaceAll(text, "ios", "iOS")
}

autocorrect.Format("新版本ios即将发布", myFormatter{})
// "新版本 iOS 即将发布"