fix_stanox

pyrcs.converter.fix_stanox(stanox)

Fix the format of a given STANOX (station number) code.

Parameters

stanox (str or int or None) – STANOX code

Returns

standard STANOX code

Return type

str

Examples:

>>> from pyrcs.converter import fix_stanox

>>> fixed_stanox = fix_stanox(stanox=65630)
>>> fixed_stanox
'65630'

>>> fixed_stanox = fix_stanox(stanox='2071')
>>> fixed_stanox
'02071'

>>> fixed_stanox = fix_stanox(stanox=2071)
>>> fixed_stanox
'02071'