Documentation ¶
Index ¶
- Constants
- Variables
- func ArrToString(arr []string) string
- func AsciiPinyin(s string) string
- func AsciiPinyinLower(s string) string
- func BrToMarkdown(con string) string
- func CompileUris(str string) []string
- func ContentHasBase64Image(con string) bool
- func DecodeCsvArg(s string) []string
- func DecodePercent(s string) string
- func Diff(arr1 []string, arr2 []string) []string
- func FilteredSQLInject(to_match_str string) bool
- func FromBool(b bool) string
- func FromByte(val byte) string
- func FromChinese(str string) string
- func FromFloat64(i float64) string
- func FromInt(val int) string
- func FromInt64(i int64) string
- func FromObject(obj interface{}) string
- func FromStrList(strs []string) string
- func FromUInt64(i uint64) string
- func GbkLen(s string) int
- func GenContent(content string, length int) string
- func HMacMd5Sign(key string, str string) string
- func Html2(s *goquery.Selection) (ret string, e error)
- func HtmlToMarkDownHtml(con string) string
- func IsEmail(str string) bool
- func IsEmpty(str string) bool
- func IsInvalidDisplayName(displayName string) bool
- func IsMobile(str string) bool
- func MarkdownToHtml(con string) string
- func Md5(str string) string
- func Md5Object(obj interface{}) string
- func ProcessMobile(mobile string) string
- func RandomString(length int) string
- func RemoveEmptyPTag(s string) string
- func RemoveHtmlTag(s string) (output string)
- func RemoveHtmlTagExceptBlank(s string) (output string)
- func RemoveMarkdownTag(s string) string
- func RemoveSpecialCharacters(s string) string
- func RemoveStylesOfHtmlTag(html string, keptStyles ...string) string
- func StrArrToInt64Arr(strs []string) []int64
- func StrInArray(str string, strs []string) bool
- func Sub(str string, begin, length int) string
- func ToBool(s string) bool
- func ToByte(str string) byte
- func ToFloat64(str string) float64
- func ToInt(str string) int
- func ToInt32(str string) int32
- func ToInt64(str string) int64
- func ToInt64Arr(str string) []int64
- func ToLike(str string) string
- func ToObject(obj interface{}, str string)
- func ToSqlNullString(key string, isNull bool) sql.NullString
- func ToStrList(str string) []string
- func ToStringArr(str string) []string
- func TrimSpace(str string) string
- func UUID() string
Constants ¶
View Source
const ( UriRegexRule = `(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]` DisplayNameRegexRule = `^[-\w|\p{Han}]+$` )
View Source
const (
BrChar = `
`
)
Variables ¶
View Source
var ( MarkdownToHtmlCommonExtensions = 0 | blackfriday.EXTENSION_NO_INTRA_EMPHASIS | blackfriday.EXTENSION_TABLES | blackfriday.EXTENSION_FENCED_CODE | blackfriday.EXTENSION_AUTOLINK | blackfriday.EXTENSION_STRIKETHROUGH | blackfriday.EXTENSION_SPACE_HEADERS | blackfriday.EXTENSION_HEADER_IDS | blackfriday.EXTENSION_BACKSLASH_LINE_BREAK | blackfriday.EXTENSION_DEFINITION_LISTS | blackfriday.EXTENSION_HARD_LINE_BREAK MarkdownToHtmlCommonHtmlFlags = 0 | blackfriday.HTML_USE_XHTML | blackfriday.HTML_USE_SMARTYPANTS | blackfriday.HTML_SMARTYPANTS_FRACTIONS | blackfriday.HTML_SMARTYPANTS_DASHES | blackfriday.HTML_SMARTYPANTS_LATEX_DASHES )
Functions ¶
func ArrToString ¶
func AsciiPinyin ¶
func AsciiPinyinLower ¶
func BrToMarkdown ¶
func CompileUris ¶
func ContentHasBase64Image ¶
func DecodeCsvArg ¶
func DecodePercent ¶
func FromChinese ¶
func FromFloat64 ¶
func FromObject ¶
func FromObject(obj interface{}) string
func FromStrList ¶
func FromUInt64 ¶
func GenContent ¶
func HMacMd5Sign ¶
func HtmlToMarkDownHtml ¶
func IsInvalidDisplayName ¶
func MarkdownToHtml ¶
func ProcessMobile ¶
func RandomString ¶
func RemoveEmptyPTag ¶
func RemoveHtmlTag ¶
HTML strips html tags, replace common entities, and escapes <>&;'" in the result. Note the returned text may contain entities as it is escaped by HTMLEscapeString, and most entities are not translated.
func RemoveMarkdownTag ¶
Strip returns the given string sans any Markdown.
func RemoveSpecialCharacters ¶
func RemoveStylesOfHtmlTag ¶
func StrArrToInt64Arr ¶
func StrInArray ¶
func ToSqlNullString ¶
func ToSqlNullString(key string, isNull bool) sql.NullString
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.