Class: qgsPermissiveToInt

class qgis.core.qgsPermissiveToInt(string: str) → Tuple[int, bool]

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

Parameters
  • string (str) – string to convert

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

Return type

Tuple[int, bool]

Returns

string converted to int if possible

See also

permissiveToDouble()