1
0
Fork 0
mirror of https://github.com/platomav/BIOSUtilities.git synced 2025-05-17 08:35:04 -04:00
BIOSUtilities/common/text_ops.py
platomav 40686d5edf Improved AMI UCP > NAL unpacking
Fix potential illegal path traversals
2022-04-15 18:17:58 +03:00

15 lines
436 B
Python

#!/usr/bin/env python3
#coding=utf-8
# Generate padding (spaces or tabs)
def padder(padd_count, tab=False):
return ('\t' if tab else ' ') * padd_count
# Get String from given input object
def to_string(input_object, sep_char=''):
if type(input_object).__name__ in ('list','tuple'):
output_string = sep_char.join(map(str, input_object))
else:
output_string = str(input_object)
return output_string