aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/pythran/pythran/pythonic/include/builtins/str/split.hpp
blob: 43304c4b3e6e4286b929a22945c1f8c49b2f0b51 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef PYTHONIC_INCLUDE_BUILTIN_STR_SPLIT_HPP
#define PYTHONIC_INCLUDE_BUILTIN_STR_SPLIT_HPP

#include "pythonic/include/types/NoneType.hpp"
#include "pythonic/include/types/list.hpp"
#include "pythonic/include/types/str.hpp"
#include "pythonic/include/utils/functor.hpp"

PYTHONIC_NS_BEGIN

namespace builtins
{

  namespace str
  {

    types::list<types::str> split(types::str const &in, types::str const &sep,
                                  long maxsplit = -1);

    types::list<types::str> split(types::str const &s,
                                  types::none_type const & = {},
                                  long maxsplit = -1);

    DEFINE_FUNCTOR(pythonic::builtins::str, split);
  } // namespace str
} // namespace builtins
PYTHONIC_NS_END
#endif