Skip to content
Snippets Groups Projects
Commit a6525360 authored by poly000's avatar poly000
Browse files

create branch_name_hex.py

parent 4e659e1f
No related branches found
No related tags found
No related merge requests found
from functools import reduce
utf16le_hex = lambda name_part: reduce(
lambda s,next: s+next, (("%02x" % ch) for ch in name_part.encode("utf-16le"))
)
result = '/'.join(utf16le_hex(part) for part in input().split('/'))
print(result)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment