Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

boost/python/str.hpp

Boost , Boost.Python Reference Manual , Chapter 3. Object Wrappers

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

TypeWrapperдля Python<str>тип.

струнные методывстроенного<str>типа Python. Семантика конструкторов и функций-членов, определенных ниже, за исключением двухаргументных конструкторов, которые строят струнные объекты из ряда символов, может быть полностью понята путем чтения определения понятияTypeWrapper. Поскольку стр является публично полученным из<object>, публичный<object>интерфейс применяется также к<str>экземплярам.

namespace boost { namespace python
{
  class str : public object
  {
   public:
      str(); // new str
      str(char const* s); // new str
      str(char const* start, char const* finish); // new str
      str(char const* start, std::size_t length); // new str
      template <class T>
      explicit str(T const& other);
      str capitalize() const;
      template <class T>
      str center(T const& width) const;
      template<class T>
      long count(T const& sub) const;
      template<class T1, class T2>
      long count(T1 const& sub,T2 const& start) const;
      template<class T1, class T2, class T3>
      long count(T1 const& sub,T2 const& start, T3 const& end) const;
      object decode() const;
      template<class T>
      object decode(T const& encoding) const;
      template<class T1, class T2>
      object decode(T1 const& encoding, T2 const& errors) const;
      object encode() const;
      template <class T>
      object encode(T const& encoding) const;
      template <class T1, class T2>
      object encode(T1 const& encoding, T2 const& errors) const;
      template <class T>
      bool endswith(T const& suffix) const;
      template <class T1, class T2>
      bool endswith(T1 const& suffix, T2 const& start) const;
      template <class T1, class T2, class T3>
      bool endswith(T1 const& suffix, T2 const& start, T3 const& end) const;
      str expandtabs() const;
      template <class T>
      str expandtabs(T const& tabsize) const;
      template <class T>
      long find(T const& sub) const;
      template <class T1, class T2>
      long find(T1 const& sub, T2 const& start) const;
      template <class T1, class T2, class T3>
      long find(T1 const& sub, T2 const& start, T3 const& end) const;
      template <class T>
      long index(T const& sub) const;
      template <class T1, class T2>
      long index(T1 const& sub, T2 const& start) const;
      template <class T1, class T2, class T3>
      long index(T1 const& sub, T2 const& start, T3 const& end) const;
      bool isalnum() const;
      bool isalpha() const;
      bool isdigit() const;
      bool islower() const;
      bool isspace() const;
      bool istitle() const;
      bool isupper() const;
      template <class T>
      str join(T const& sequence) const;
      template <class T>
      str ljust(T const& width) const;
      str lower() const;
      str lstrip() const;
      template <class T1, class T2>
      str replace(T1 const& old, T2 const& new_) const;
      template <class T1, class T2, class T3>
      str replace(T1 const& old, T2 const& new_, T3 const& maxsplit) const;
      template <class T>
      long rfind(T const& sub) const;
      template <class T1, class T2>
      long rfind(T1 const& sub, T2 const& start) const;
      template <class T1, class T2, class T3>
      long rfind(T1 const& sub, T2 const& start, T3 const& end) const;
      template <class T>
      long rindex(T const& sub) const;
      template <class T1, class T2>
      long rindex(T1 const& sub, T2 const& start) const;
      template <class T1, class T2, class T3>
      long rindex(T1 const& sub, T2 const& start, T3 const& end) const;
      template <class T>
      str rjust(T const& width) const;
      str rstrip() const;
      list split() const;
      template <class T>
      list split(T const& sep) const;
      template <class T1, class T2>
      list split(T1 const& sep, T2 const& maxsplit) const;
      list splitlines() const;
      template <class T>
      list splitlines(T const& keepends) const;
      template <class T>
      bool startswith(T const& prefix) const;
      template <class T1, class T2>
      bool startswidth(T1 const& prefix, T2 const& start) const;
      template <class T1, class T2, class T3>
      bool startswidth(T1 const& prefix, T2 const& start, T3 const& end) const;
      str strip() const;
      str swapcase() const;
      str title() const;
      template <class T>
      str translate(T const& table) const;
      template <class T1, class T2>
      str translate(T1 const& table, T2 const& deletechars) const;
      str upper() const;
  };
}}
using namespace boost::python;
str remove_angle_brackets(str x)
{
  return x.strip('<').strip('>');
}

PrevUpHomeNext

Статья boost/python/str.hpp раздела Boost.Python Reference Manual Chapter 3. Object Wrappers может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: Chapter 3. Object Wrappers ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-05-20 00:41:03/0.025758028030396/1