예제 #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
예제 #2
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
예제 #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
예제 #4
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