From e774734fd697f6741cb8c52f249f2f2f7adb2fad Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Mon, 29 Jul 2019 23:13:54 +0200 Subject: Use string[i] instead of GetChar(string, i) where appropriate --- DTTemplateFunctions.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'DTTemplateFunctions.c') diff --git a/DTTemplateFunctions.c b/DTTemplateFunctions.c index 6d8cd7e..e494766 100644 --- a/DTTemplateFunctions.c +++ b/DTTemplateFunctions.c @@ -76,10 +76,10 @@ global func Function(arguments, commands) var escapeCount = 0; for(var i = 0; i < GetLength(command); ++i) { - var c = GetChar(command, i); + var c = command[i]; if(isArg) { - if(c == 37) // % + if(c == "%") { if(argument == "") { @@ -102,7 +102,7 @@ global func Function(arguments, commands) } isArg = false; } - else if(argument == "" && c == 47) // / + else if(argument == "" && c == "/") { ++escapeCount; } @@ -114,22 +114,22 @@ global func Function(arguments, commands) contentPart = ""; } - argument = Format("%s%c", argument, c); + argument ..= c; } } else { - if(c == 37) // % + if(c == "%") { isArg = true; } - else if(c == 39) // ' + else if(c == "'") { contentPart ..= "\""; } else { - contentPart = Format("%s%c", contentPart, c); + contentPart ..= c; } } } -- cgit v1.2.3-54-g00ecf