Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexNotAny ¶
IndexNotAny is similar with strings.IndexAny but showing the opposite behavior.
Example ¶
package main import ( "fmt" "github.com/gusmin/go-prompt/internal/strings" ) func main() { fmt.Println(strings.IndexNotAny("golang", "glo")) fmt.Println(strings.IndexNotAny("golang", "gl")) fmt.Println(strings.IndexNotAny("golang", "golang")) }
Output: 3 1 -1
func IndexNotByte ¶
IndexNotByte is similar with strings.IndexByte but showing the opposite behavior.
Example ¶
package main import ( "fmt" "github.com/gusmin/go-prompt/internal/strings" ) func main() { fmt.Println(strings.IndexNotByte("golang", 'g')) fmt.Println(strings.IndexNotByte("golang", 'x')) fmt.Println(strings.IndexNotByte("gggggg", 'g')) }
Output: 1 0 -1
func LastIndexNotAny ¶
LastIndexNotAny is similar with strings.LastIndexAny but showing the opposite behavior.
Example ¶
package main import ( "fmt" "github.com/gusmin/go-prompt/internal/strings" ) func main() { fmt.Println(strings.LastIndexNotAny("golang", "agn")) fmt.Println(strings.LastIndexNotAny("golang", "an")) fmt.Println(strings.LastIndexNotAny("golang", "golang")) }
Output: 2 5 -1
func LastIndexNotByte ¶
LastIndexNotByte is similar with strings.LastIndexByte but showing the opposite behavior.
Example ¶
package main import ( "fmt" "github.com/gusmin/go-prompt/internal/strings" ) func main() { fmt.Println(strings.LastIndexNotByte("golang", 'g')) fmt.Println(strings.LastIndexNotByte("golang", 'x')) fmt.Println(strings.LastIndexNotByte("gggggg", 'g')) }
Output: 4 5 -1
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.