diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2019-07-29 23:13:54 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2019-07-29 23:13:54 +0200 |
| commit | e774734fd697f6741cb8c52f249f2f2f7adb2fad (patch) | |
| tree | 060ba51620cb848bf7abad5d14b942210b791fdc /DTTemplateFunctions.c | |
| parent | 012cd7a5888913ae5efc0762a019ff1fd5e27551 (diff) | |
| download | System.c4g-e774734fd697f6741cb8c52f249f2f2f7adb2fad.tar.gz System.c4g-e774734fd697f6741cb8c52f249f2f2f7adb2fad.zip | |
Use string[i] instead of GetChar(string, i) where appropriate
Diffstat (limited to 'DTTemplateFunctions.c')
| -rw-r--r-- | DTTemplateFunctions.c | 14 |
1 files changed, 7 insertions, 7 deletions
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;
}
}
}
|
