Пример #1
0
 def _str_lstrip(self, to_strip=None):
     if to_strip is None:
         if hasattr(pc, "utf8_ltrim_whitespace"):
             return type(self)(pc.utf8_ltrim_whitespace(self._data))
     else:
         if hasattr(pc, "utf8_ltrim"):
             return type(self)(pc.utf8_ltrim(self._data,
                                             characters=to_strip))
     return super()._str_lstrip(to_strip)
Пример #2
0
    def _str_lstrip(self, to_strip=None):
        if pa_version_under4p0:
            return super()._str_lstrip(to_strip)

        if to_strip is None:
            result = pc.utf8_ltrim_whitespace(self._data)
        else:
            result = pc.utf8_ltrim(self._data, characters=to_strip)
        return type(self)(result)