cns_checkId

Checks whether the ID is valid.

Synopsis

int cns_checkId(string text);

Parameters

Parameter Description
text Id which is checked

Return value

Possible return values:

  • 0 => Valid ID

  • -1 => Invalid ID

Errors

Possible errors:

  • The ID contains invalid characters

Description

This function checks if the given ID is valid.

main()
{
  DebugN(cns_checkId("MyId")); //Output: 0
  DebugN(cns_checkId("M!.d")); //Output: -1
}

Availability

UI, CTRL