Function: qgsPermissiveToInt

qgis.core.qgsPermissiveToInt(string: str | None)

Converts a string to an integer in a permissive way, e.g., allowing for incorrect numbers of digits between thousand separators

Parameters:
  • string (Optional[str]) – string to convert

  • ok – will be set to True if conversion was successful

Return type:

(int, bool)

Returns:

string converted to int if possible

See also

permissiveToDouble()