Ends with: Difference between revisions
Jump to navigation
Jump to search
Created page with "<onlyinclude>{{{{{format|Function2}}} |name=ends_with |function1.return_type=boolean |function1.description=Checks whether a string ends with a suffix string. (case-sensitive)..." |
AlbinoRhino (talk | contribs) mNo edit summary |
||
Line 15: | Line 15: | ||
|code= | |code= | ||
<syntaxhighlight lang="d"> | <syntaxhighlight lang="d"> | ||
ends_with( "The quick brown fox jumps over the lazy dog", "lazy dog" ); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|moreinfo= | |moreinfo= |
Latest revision as of 12:42, 11 January 2021
Function Syntax
boolean ends_with( string value, string suffix )
- Checks whether a string ends with a suffix string. (case-sensitive)
- value: String to check
- suffix: Suffix to search for
This function was added in r17911.
Code Samples
The following function call will return true
:
ends_with( "The quick brown fox jumps over the lazy dog", "lazy dog" );