View source code
							
							
						
								Display the source code in std/regex.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						std.regex.Splitter/splitter  - multiple declarations
				Function splitter
Splits a string r using a regular expression pat as a separator.
						
					
				Parameters
| Name | Description | 
|---|---|
| keepSeparators | flag to specify if the matches should be in the resulting range | 
| r | the string to split | 
| pat | the pattern to split on | 
Returns
A lazy range of strings
Example
import stdExample
Split on a pattern, but keep the matches in the resulting range
import stdStruct Splitter
Splits a string r using a regular expression pat as a separator.
						
				struct Splitter(Flag!("keepSeparators") keepSeparators = No
				  
				
				if (isSomeString!Range && isRegexFor!(RegEx, Range));
						
					
				Properties
| Name | Type | Description | 
|---|---|---|
| empty[get] | bool | Forward range primitives. | 
| front[get] | Range | Forward range primitives. | 
| save[get] | auto | Forward range primitives. | 
Methods
| Name | Description | 
|---|---|
| popFront() | Forward range primitives. | 
Parameters
| Name | Description | 
|---|---|
| keepSeparators | flag to specify if the matches should be in the resulting range | 
| r | the string to split | 
| pat | the pattern to split on | 
Returns
A lazy range of strings
Example
import stdExample
Split on a pattern, but keep the matches in the resulting range
import stdAuthors
Dmitry Olshansky,
    API and utility constructs are modeled after the original std
  by Walter Bright and Andrei Alexandrescu.
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.