strw

package
v0.0.0-...-07ef6c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2023 License: Artistic-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Comma              string = ","
	TwoSpace           string = "  "
	OneSpace           string = " "
	HyphenSpace        string = "- "
	Hyphen             string = "-"
	Linefeed           string = "\n"
	WindowsLinefeed    string = "\r\n"
	Dot                string = "."
	Split              string = "|"
	Star               string = "*"
	Pound              string = "#"
	GreaterThan        string = ">"
	LessThan           string = "<"
	Equal              string = "="
	LeftBracket        string = "["
	RightBracket       string = "]"
	LeftParentheses    string = "("
	RightParentheses   string = ")"
	Exclamation        string = "!"
	Point              string = "."
	UnderLine          string = "_"
	Kong               string = ""
	Colon              string = ":"
	LeftQuote          string = "'"
	RightQuote         string = "'"
	LeftDoubleQuote    string = "\""
	RightDoubleQuote   string = "\""
	Tab                string = "\t"
	FullStop           string = "。"
	QuanjiaoSpace      string = " "
	SlantingBar        string = "/"
	SlantingBarReverse string = "\\"
	At                 string = "@"
	Question           string = "?"
	And                string = "&"
	Percentage         string = "%"
	LeftChineseBracket string = "【"
	RightChieseBracket string = "】"
)
View Source
const (
	HTMLNbsp string = "&nbsp;"
)

Variables

View Source
var (
	FourSpace  string = strings.Repeat(TwoSpace, 2)
	SixSpace   string = strings.Repeat(TwoSpace, 3)
	EightSpace string = strings.Repeat(TwoSpace, 4)
	TenSpace   string = strings.Repeat(TwoSpace, 5)
)

Functions

func Case2Camel

func Case2Camel(name string) string

蛇形转驼峰

func MarkdownBold

func MarkdownBold(input string) string

加粗

func MarkdownItalic

func MarkdownItalic(input string) string

斜体

func MarkdownLinefeed

func MarkdownLinefeed() string
func MarkdownLink(input string, url string) string

链接 [this is a link](http://name.com)

func MarkdownPhonesInAt

func MarkdownPhonesInAt(phones []string) string

func MarkdownPhonesInText

func MarkdownPhonesInText(phones []string) string
{
     "msgtype": "markdown",
     "markdown": {
         "title":"杭州天气",
         "text": "#### 杭州天气 @150XXXXXXXX \n> 9度,西北风1级,空气良89,相对温度73%\n> ![screenshot](https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png)\n> ###### 10点20分发布 [天气](https://www.dingalk.com) \n"
     },
      "at": {
          "atMobiles": [
              "150XXXXXXXX"
          ],
          "atUserIds": [
              "user123"
          ],
          "isAtAll": false
      }
 }

func MarkdownPicture

func MarkdownPicture(url string) string

图片 ![](http://name.com/pic.jpg)

func MarkdownQuote

func MarkdownQuote(input string) string

func MarkdownSortedSlice

func MarkdownSortedSlice(s []string) string

有序列表 1. item1 2. item2

func MarkdownSubjectLevelFive

func MarkdownSubjectLevelFive(input string) string

func MarkdownSubjectLevelFour

func MarkdownSubjectLevelFour(input string) string

func MarkdownSubjectLevelSix

func MarkdownSubjectLevelSix(input string) string

func MarkdownSubjectLevelThree

func MarkdownSubjectLevelThree(input string) string

func MarkdownSubjectLevelTwo

func MarkdownSubjectLevelTwo(input string) string

func MarkdownUnsortedSlice

func MarkdownUnsortedSlice(s []string) string

无序列表 - item1 - item2

func MirrorString

func MirrorString(input string) string

func MirrorStringWithSeparation

func MirrorStringWithSeparation(input string, separation string) string

func RemoveExtraSpace

func RemoveExtraSpace(s string) string

func ReverseString

func ReverseString(input string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL