std.metastrings
Templates with which to do compile-time manipulation of strings. License:Boost License 1.0. Authors:
Walter Bright, Don Clugston Copyright Digital Mars 2007 - 2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at ) http:
//www.boost.org/LICENSE_1_0.txt
- Formats constants into a string at compile time. Analogous to std.string.format.
Parameters:
A = tuple of constants, which can be strings, characters, or integral values. Formats:
The formats supported are %s for strings, and %% for the % character. Example:
import std.metastrings; import std.stdio; void main() { string s = Format!("Arg %s = %s", "foo", 27); writefln(s); // "Arg foo = 27" }
- Convert constant argument to a string.
- Parse unsigned integer literal from the start of string s.
Returns:
.value = the integer literal as a string, .rest = the string following the integer literal Otherwise:
.value = null, .rest = s - Parse integer literal optionally preceded by '-' from the start
of string s.
Returns:
.value = the integer literal as a string, .rest = the string following the integer literal Otherwise:
.value = null, .rest = s - Deprecated aliases held for backward compatibility.