mirror of
https://github.com/boostorg/python.git
synced 2026-01-23 17:52:17 +00:00
doc update
[SVN r15674]
This commit is contained in:
@@ -631,9 +631,15 @@ proxy<object_slice> slice(T const& start; start, V const& finish);
|
||||
|
||||
<h3><a name="object-spec"></a>Class <code>object</code></h3>
|
||||
|
||||
<p>The intention is that <code>object</code> acts as much like a Python
|
||||
variable as possible. Thus expressions you'd expect to work in Python
|
||||
should generally work in the same way from C++.</p>
|
||||
<p>The intention is that <code>object</code> acts as much like a
|
||||
Python variable as possible. Thus expressions you'd expect to work
|
||||
in Python should generally work in the same way from C++. Most of
|
||||
<code>object</code>'s interface is provided by its base class
|
||||
<code><a
|
||||
href="#object_operators-spec">object_operators</a><object></code>,
|
||||
and the <a href="#functions">free functions</a> defined in this
|
||||
header.
|
||||
</p>
|
||||
|
||||
<h4><a name="object-spec-synopsis"></a>Class <code>object</code>
|
||||
synopsis</h4>
|
||||
|
||||
230
doc/v2/str.html
Normal file
230
doc/v2/str.html
Normal file
@@ -0,0 +1,230 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content=
|
||||
"HTML Tidy for Windows (vers 1st August 2002), see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../boost.css">
|
||||
|
||||
<title>Boost.Python - <boost/python/str.hpp></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
|
||||
"header">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../../index.htm"><img height="86" width="277"
|
||||
alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
|
||||
<td valign="top">
|
||||
<h1 align="center">Boost.Python</h1>
|
||||
|
||||
<h2 align="center">Header <boost/python/str.hpp></h2>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
|
||||
<h2>Contents</h2>
|
||||
|
||||
<dl class="page-index">
|
||||
<dt><a href="#introduction">Introduction</a></dt>
|
||||
|
||||
<dt><a href="#classes">Classes</a></dt>
|
||||
|
||||
<dd>
|
||||
<dl class="page-index">
|
||||
<dt><a href="#str-spec">Class <code>str</code></a></dt>
|
||||
|
||||
<dd>
|
||||
<dl class="page-index">
|
||||
<dt><a href="#str-spec-synopsis">Class <code>str</code>
|
||||
synopsis</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt><a href="#examples">Example(s)</a></dt>
|
||||
</dl>
|
||||
<hr>
|
||||
|
||||
<h2><a name="introduction"></a>Introduction</h2>
|
||||
|
||||
<p>Exposes a <a href=
|
||||
"ObjectWrapper.html#TypeWrapper-concept">TypeWrapper</a> for the Python
|
||||
<a href=
|
||||
"http://www.python.org/dev/doc/devel/lib/string-methods.html">str</a>
|
||||
type.</p>
|
||||
|
||||
<h2><a name="classes"></a>Classes</h2>
|
||||
|
||||
<h3><a name="str-spec"></a>Class <code>str</code></h3>
|
||||
|
||||
<p>Exposes the <a href=
|
||||
"http://www.python.org/dev/doc/devel/lib/string-methods.html">string
|
||||
methods</a> of Python's built-in <code>str</code> type. The
|
||||
semantics of the constructors and member functions defined below
|
||||
can be fully understood by reading the <a href=
|
||||
"ObjectWrapper.html#TypeWrapper-concept">TypeWrapper</a> concept
|
||||
definition. Since <code>str</code> is publicly derived from
|
||||
<code><a href="object.html#object-spec">object</a></code>, the
|
||||
public object interface applies to <code>str</code> instances as
|
||||
well.</p>
|
||||
|
||||
<h4><a name="str-spec-synopsis"></a>Class <code>str</code>
|
||||
synopsis</h4>
|
||||
<pre>
|
||||
namespace boost
|
||||
{
|
||||
class str : public object
|
||||
{
|
||||
public:
|
||||
str(); // new str
|
||||
|
||||
str(const char* s); // 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;
|
||||
};
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h2><a name="examples"></a>Example</h2>
|
||||
<pre>
|
||||
using namespace boost::python;
|
||||
str remove_angle_brackets(str x)
|
||||
{
|
||||
return x.strip('<').strip('>');
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>Revised 3 October, 2002</p>
|
||||
|
||||
<p><i>© Copyright <a href=
|
||||
"../../../../people/dave_abrahams.htm">Dave Abrahams</a> 2002. All Rights
|
||||
Reserved.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user