def split_plus_test(): separator_array_ = ['ab', ', ', ' ', 'e', '中文', ':', '|'] str_ = 'abc,de fgh, ijk,lmn:op|qr中文st' separator_array_ = TypeUtils.convert_to_type(separator_array_, unicode) str_ = TypeUtils.convert_to_type(str_, unicode) print StringUtils.split_plus(str_, separator_array_)
def convert_to_type_test(): print TypeUtils.convert_to_type(['杭州西湖', ['北京']], unicode) print TypeUtils.convert_to_type(TypeUtils.convert_to_type(['杭州西湖', '123', 123], int), unicode) print TypeUtils.convert_to_type([['123', '中文'], 123], float)