Skip to content

Commit

Permalink
Merge pull request #3772 from burner/std.string.capitalize_unittest_e…
Browse files Browse the repository at this point in the history
…xample

std.string.capitalize_unittest_example
  • Loading branch information
andralex committed Oct 27, 2015
2 parents 900e0dd + 93511d5 commit 44a9bd0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions std/string.d
Expand Up @@ -2224,6 +2224,13 @@ S capitalize(S)(S s) @trusted pure
return changed ? cast(S)retval : s;
}

///
pure @safe unittest
{
assert(capitalize("hello") == "Hello");
assert(capitalize("World") == "World");
}

@trusted pure unittest
{
import std.conv : to;
Expand Down

0 comments on commit 44a9bd0

Please sign in to comment.