MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / integerToLetter

Function integerToLetter

src_classic/utils.py:4839–4854  ·  view source on GitHub ↗

Returns letter sequence string for integer i.

(i)

Source from the content-addressed store, hash-verified

4837
4838
4839def integerToLetter(i) -> str:
4840 """Returns letter sequence string for integer i."""
4841 # William Chapman, Jorj McKie, 2021-01-06
4842
4843 ls = string.ascii_uppercase
4844 n, a = 1, i
4845 while pow(26, n) <= a:
4846 a -= int(math.pow(26, n))
4847 n += 1
4848
4849 str_t = ""
4850 for j in reversed(range(n)):
4851 f, g = divmod(a, int(math.pow(26, j)))
4852 str_t += ls[f]
4853 a = g
4854 return str_t
4855
4856
4857def integerToRoman(num: int) -> str:

Callers 1

construct_labelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…