AL
AL copied to clipboard
Text.Substring(1, x) unexpectedly works different from Copystr(Text, 1, x)
Text t := 'string';
CopyStr(t, 1, 20), works as expected, and gives the full string.
t.Substring(1,20) crashes on on a runtime error "must refer to a location within the string".
Not consistent behavior, in my opinion.
Hi @extensionsv2training,
It is because it didn't try to stay consistent with CopyStr but with how C# is working. Thanks for your feedback.