picop.cyconversion#

Conversion helpers.

picop.cyconversion.conv_cstr_to_double(s)#

Parse s as a C double via PyOS_string_to_double.

Notes

s must be bytes with no surrounding whitespace. Alias of conv_string_to_double (prefer *_cstr naming). See Safety.

Parameters:

s (bytes)

Return type:

float

picop.cyconversion.conv_stricmp(s1, s2)#

Case-insensitive C-string compare via PyOS_stricmp.

Notes

s1 / s2 must be bytes, not str.

Parameters:
Return type:

int

picop.cyconversion.conv_strnicmp(s1, s2, size)#

Case-insensitive compare of at most size bytes via PyOS_strnicmp.

Notes

s1 / s2 must be bytes, not str.

Parameters:
Return type:

int