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 /DTFormatN.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 'DTFormatN.c')
| -rw-r--r-- | DTFormatN.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/DTFormatN.c b/DTFormatN.c index 37f604e..1556265 100644 --- a/DTFormatN.c +++ b/DTFormatN.c @@ -20,8 +20,8 @@ global func FormatN(string format, array placeholders, array items) for(var i = 0; i < GetLength(format); ++i)
{
- var c = GetChar(format, i);
- if(c == 37) // %
+ var c = format[i];
+ if(c == "%")
{
if(inPlaceholder == 0)
{
@@ -29,7 +29,7 @@ global func FormatN(string format, array placeholders, array items) }
else if(inPlaceholder == 1)
{
- if(c == 37 && GetLength(placeholderType) == 0) // %
+ if(GetLength(placeholderType) == 0)
{
ret ..= "%";
inPlaceholder = 0;
@@ -59,15 +59,15 @@ global func FormatN(string format, array placeholders, array items) {
if(inPlaceholder == 0)
{
- ret = Format("%s%c", ret, c);
+ ret ..= c;
}
else if(inPlaceholder == 1)
{
- placeholderType = Format("%s%c", placeholderType, c);
+ placeholderType ..= c;
}
else if(inPlaceholder == 2)
{
- placeholderPart = Format("%s%c", placeholderPart, c);
+ placeholderPart ..= c;
}
}
}
|
