Zuu wrote:I noticed "IsStartsWith" and "IsEndsWith". Do you have any particular reason for not using correct grammar?
No, I haven't any, as I just guess how to write English correctly.
Zuu wrote:I would suggest "IsStartingWidth" and "IsEndingWidth".
I guess you would like to write "IsStartingWith" and "IsEndingWith".
Yexo wrote:What about "StartsWith" and "EndsWith"?
Well, the function does return either true or false. So, the name should be begin with "Is" , no?.
Code: Select all
import("AILib.String", "CString", 1);
local my_name = "fanioz";
then (1)
Code: Select all
if (CString.IsStartingWith(my_name, "fan")) {
//nothing
}
OR (2)
Code: Select all
if (CString.StartsWith(my_name, "fan")) {
//nothing
}