1
0

Fix RIGHT$

This commit is contained in:
otya128
2016-12-24 16:20:16 +09:00
parent ed85733345
commit 694f4736df

View File

@@ -1226,12 +1226,16 @@ class BuiltinFunction
{ {
if (len >= str.length) if (len >= str.length)
{ {
return str[0..$]; return str;
} }
return str[0..len]; return str[0..len];
} }
static wstring RIGHT(wstring str, int len) static wstring RIGHT(wstring str, int len)
{ {
if (len >= str.length)
{
return str;
}
return str[$ - len..$]; return str[$ - len..$];
} }
static wstring SUBST(wstring str, int i, Value alen, DefaultValue!(Value,false) areplace) static wstring SUBST(wstring str, int i, Value alen, DefaultValue!(Value,false) areplace)