Skip to content

Commit 9f4903d

Browse files
author
Kefkius
committed
Only strip leading '0x' strings
1 parent d886d32 commit 9f4903d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

hexs/hexs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ def is_hex(s):
1313

1414
def format_hex(s):
1515
"""Remove extraneous characters from s and make its length even."""
16-
return make_even(s.lstrip('0x').rstrip('L'))
16+
while s.startswith('0x'):
17+
s = s[2:]
18+
return make_even(s.rstrip('L'))
1719

1820
def hexs(arg):
1921
"""Return the formatted hex representation of arg."""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import setup, find_packages
22

3-
version = '1.0.0'
3+
version = '1.1.0'
44

55

66
setup(

0 commit comments

Comments
 (0)