Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static dchar formatChar = '%';
- string tostring(Args...)(Args args){
- static if(args.length > 0){
- static if(is(args[0] == string) && args[0].find(formatChar) > -1){
- int i = args[0].find(formatChar);
- return args[0][0..i] ~ to!string(args[1]) ~ tostring(args[0][i+1..$], args[2..$]);
- }else{
- return to!string(args[0]) ~ tostring(args[1..$]);
- }
- }else{
- return "";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement