package
module
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Feb 26, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
README
¶
Regex library
Candidate functions :
| Func Name |
Prototype |
Description |
Comments |
| Find |
Find(pattern string, str string) string {} |
Returns the first match of the pattern in the string |
N/A |
| FindAll |
FindAll(pattern string, str string) []string {} |
Returns all matches of the pattern in the string |
N/A |
| FindAllIndex |
FindAllIndex(pattern string, str string) []int {} |
Returns the indexes of all matches of the pattern in the string |
N/A |
| FindIndex |
FindIndex(pattern string, str string) []int {} |
Returns the first and last index of the first match of the pattern in the string |
N/A |
| Match |
Match(pattern string, str string) bool {} |
Returns true if the pattern matches the string |
N/A |
| Replace |
Replace(pattern, str, new string, nb int) string {} |
Replaces the nb first matches of the pattern in the string with the new string |
N/A |
| ReplaceAll |
ReplaceAll(pattern string, str string, new string) string {} |
Replaces all matches of the pattern in the string with the new string |
N/A |
Documentation
¶
-
func Find(pattern, str string) string
-
func FindAll(pattern, str string) []string
-
func FindAllIndex(pattern, str string) []int
-
func FindIndex(pattern, str string) int
-
func Match(pattern, str string) bool
-
func Replace(pattern, str, new string, nb int) string
-
func ReplaceAll(pattern, str, new string) string
Find returns the first match of the pattern in the string
FindAll returns all matches of the pattern in the string
FindAllIndex returns the indexes of all matches of the pattern in the string
FindIndex returns the first and last index of the first match of the pattern in the string
Match returns true if the pattern matches the string
Replace replaces the nb first matches of the pattern in the string with the new string
ReplaceAll replaces all matches of the pattern in the string with the new string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.