View source code
							
							
						
								Display the source code in dmd/root/string.d from which thispage was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create aBugzilla 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 usinglocal clone.
							
						Module dmd.root.string
Contains various string related functions.
Documentation
https://dlang.org/phobos/dmd_root_string.html
Coverage
https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/string.d
Functions
| Name | Description | 
|---|---|
								
									dstrcmp(s1, s2)
								
							 | 
							A string comparison functions that returns the same result as strcmp | 
								
									findBetween(str, l, r)
								
							 | 
							Find a string inbetween two substrings | 
								
									findSplit(str, needle)
								
							 | 
							Find a substring in a string and split the string into before and after parts. | 
								
									fTuple(str)
								
							 | 
							|
								
									iequals(s1, s2)
								
							 | 
							Compare two slices for equality, in a case-insensitive way | 
								
									splitLines(text)
								
							 | 
							Take text and turn it into an InputRange that emits
 slices into text for each line.
 | 
						
								
									startsWith(p, needle)
								
							 | 
							Checks if C string p starts with needle.
 | 
						
								
									stripLeadingLineTerminator(str)
								
							 | 
							Strips one leading line terminator of the given string. | 
								
									toCString(s)
								
							 | 
							Convert a D string to a C string by allocating memory, copying it, and adding a terminating 0. | 
								
									toCStringThen(src)
								
							 | 
							Copy the content of src into a C-string ('\0' terminated) then call dg
 | 
						
								
									toDString(s)
								
							 | 
							Slices a \0-terminated C-string, excluding the terminator
 | 
						
								
									toStaticArray(literal)
								
							 | 
							Infers the length N of a string literal and coerces its type to a static
 array with length N + 1. Returns the string with a null character appended
 to the end.
 | 
						
Authors
Walter Bright, https://www.digitalmars.com
License
					Copyright © 1999-2025 by the D Language Foundation | Page generated by ddox.