Esempio n. 1
0
def sortable_long_to_text(x, shift=0):
    if shift:
        x >>= shift
    #text = chr(shift) + u"%016x" % x
    #assert len(text) == 17
    text = chr(shift) + to_base85(x, True)
    return text
def sortable_long_to_text(x, shift=0):
    if shift:
        x >>= shift
    # text = chr(shift) + u"%016x" % x
    # assert len(text) == 17
    text = chr(shift) + to_base85(x, True)
    return text
Esempio n. 3
0
def sortable_int_to_text(x, shift=0):
    if shift:
        x >>= shift
    #text = chr(shift) + u"%08x" % x
    text = chr(shift) + to_base85(x, False)
    return text
def sortable_int_to_text(x, shift=0):
    if shift:
        x >>= shift
    # text = chr(shift) + u"%08x" % x
    text = chr(shift) + to_base85(x, False)
    return text