Documentation ¶
Overview ¶
Package simpleshsplit splits strings on whitespace, allowing escaped spaces
Index ¶
Examples ¶
Constants ¶
View Source
const DefaultEscape = '\\'
DefaultEscape is the escape rune used by Split.
Variables ¶
This section is empty.
Functions ¶
func Split ¶
Split splits b into space-separated substrings. A space may be escaped by preceeding it with a backslash. A backslash may be escaped in the same way.
Example ¶
parts := Split(`arg1 arg2a\ arg2b arg3a\\arg3b`) for _, part := range parts { fmt.Printf("%v\n", part) }
Output: arg1 arg2a arg2b arg3a\arg3b
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.