⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 string_.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
📖 第 1 页 / 共 3 页
字号:
+
:ARG.len
exceeds the length of the object, the result is
the sub-sequence of characters from the &obj. starting at offset
:ARG.pos
and running to the end of the &obj.:PERIOD.
:RSLTS.
The &fn. returns a &obj.:PERIOD.
:SALSO.
:SAL typ='mfun'.operator~b[]
:SAL typ='mfun'.operator~bchar
:SAL typ='mfun'.operator~bchar~bconst~b*
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.operator +
:SNPL.
:SNPFLF                 .#include <string.hpp>
:SNPFLF                 .public:
:SNPR index='operator +'.friend String operator +( String       &amp.lft,
:SNPFLF                 .                          String const &amp.rht );
:SNPR index='operator +'.friend String operator +( String       &amp.lft,
:SNPFLF                 .                          char const   *rht );
:SNPR index='operator +'.friend String operator +( char const   *lft,
:SNPFLF                 .                          String const &amp.rht );
:SNPR index='operator +'.friend String operator +( String       &amp.lft,
:SNPFLF                 .                          char          rht );
:SNPR index='operator +'.friend String operator +( char          lft,
:SNPFLF                 .                          String const &amp.rht );
:eSNPL.
:SMTICS.
The &fn. concatenates two sequences of characters into a new &obj.:PERIOD.
The new &obj. contains the sequence of characters from the
:ARG.lft
parameter followed by the sequence of characters from the
:ARG.rht
parameter.
:P.
A &null. pointer to a C string is treated as a pointer to an empty C string.
:RSLTS.
The &fn. returns a new &obj. that contains the characters from the
:ARG.lft
parameter followed by the characters from the
:ARG.rht
parameter.
:SALSO.
:SAL typ='mfun'.operator~b+=
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.operator +=
:SNPL.
:SNPFLF                  .#include <string.hpp>
:SNPFLF                  .public:
:SNPF index='operator +='.String &amp.String::operator +=( String const &amp.str );
:SNPF index='operator +='.String &amp.String::operator +=( char const   *pch );
:eSNPL.
:SMTICS.
The &fn. appends the contents of the parameter to the end of the &obj.:PERIOD.
:P.
The first form of the &fn. appends the contents of the
:ARG.str
&obj. to the &obj.:PERIOD.
:P.
The second form appends the null-terminated sequence of characters stored at
:ARG.pch
to the &obj.:PERIOD.
If the
:ARG.pch
parameter is &null., nothing is appended.
:RSLTS.
The &fn. returns a reference to the &obj. that was the target of the assignment.
:SALSO.
:SAL typ='mfun'.operator~b=
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.operator <
:SNPL.
:SNPFLF                 .#include <string.hpp>
:SNPFLF                 .public:
:SNPR index='operator <'.friend int operator <( String const &amp.lft, String const &amp.rht );
:SNPR index='operator <'.friend int operator <( String const &amp.lft, char const   *rht );
:SNPR index='operator <'.friend int operator <( char const   *lft, String const &amp.rht );
:SNPR index='operator <'.friend int operator <( String const &amp.lft, char          rht );
:SNPR index='operator <'.friend int operator <( char          lft, String const &amp.rht );
:eSNPL.
:eSNPL.
:SMTICS.
The &fn. compares two sequences of characters in terms of a
:ITALICS.less-than
relationship.
:P.
:ARG.lft
is less-than
:ARG.rht
if
:ARG.lft
if the characters of
:ARG.lft
occur before the characters of
:ARG.rht
in the collating sequence.
Upper-case and lower-case characters are considered different.
:RSLTS.
The &fn. returns a non-zero value if the
:ARG.lft
sequence of characters is less than the
:ARG.rht
sequence, otherwise zero is returned.
:SALSO.
:SAL typ='mfun'.operator~b!=
:SAL typ='mfun'.operator~b==
:SAL typ='mfun'.operator~b<=
:SAL typ='mfun'.operator~b>
:SAL typ='mfun'.operator~b>=
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.operator <<
:SNPL.
:SNPFLF                  .#include <string.hpp>
:SNPFLF                  .public:
:SNPR index='operator <<'.friend ostream &amp.operator <<( ostream &amp.strm,
:SNPFLF                  .                             String const &amp.str );
:eSNPL.
:SMTICS.
The &fn. is used to write the sequence of characters in the
:ARG.str
&obj. to the
:ARG.strm
:MONO.ostream
object. Like C strings, the value of the
:ARG.str
&obj. is written to
:ARG.strm
without the addition of any characters. No special processing occurs for any
characters in the &obj. that have special meaning for the
:ARG.strm
object, such as carriage-returns. 
:P.
The underlying implementation of the &fn. uses the ostream write method, which 
writes unformatted characters to the output stream. If formatted output is required, 
then the programmer should make use of the classes accessor methods, such as 
c_str(), and pass the resulting data item to the stream using the appropriate 
insert operator.
:RSLTS.
The &fn. returns a reference to the
:ARG.strm
parameter.
:SALSO.
:SAL typ='cls'.ostream
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.operator <=
:SNPL.
:SNPFLF                  .#include <string.hpp>
:SNPFLF                  .public:
:SNPR index='operator <='.friend int operator <=( String const &amp.lft,
:SNPFLF                  .                        String const &amp.rht );
:SNPR index='operator <='.friend int operator <=( String const &amp.lft,
:SNPFLF                  .                        char const   *rht );
:SNPR index='operator <='.friend int operator <=( char const   *lft,
:SNPFLF                  .                        String const &amp.rht );
:SNPR index='operator <='.friend int operator <=( String const &amp.lft,
:SNPFLF                  .                        char          rht );
:SNPR index='operator <='.friend int operator <=( char          lft,
:SNPFLF                  .                        String const &amp.rht );
:eSNPL.
:SMTICS.
The &fn. compares two sequences of characters in terms of a
:ITALICS.less-than or equal
relationship.
:P.
:ARG.lft
is less-than or equal to
:ARG.rht
if the characters of
:ARG.lft
are equal to or occur before the characters of
:ARG.rht
in the collating sequence.
Upper-case and lower-case characters are considered different.
:RSLTS.
The &fn. returns a non-zero value if the
:ARG.lft
sequence of characters is less than or equal to the
:ARG.rht
sequence, otherwise zero is returned.
:SALSO.
:SAL typ='mfun'.operator~b!=
:SAL typ='mfun'.operator~b==
:SAL typ='mfun'.operator~b<
:SAL typ='mfun'.operator~b>
:SAL typ='mfun'.operator~b>=
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.operator =
:SNPL.
:SNPFLF                 .#include <string.hpp>
:SNPFLF                 .public:
:SNPF index='operator ='.String &amp.String::operator =( String const &amp.str );
:SNPF index='operator ='.String &amp.String::operator =( char const   *pch );
:eSNPL.
:SMTICS.
The &fn. sets the contents of the &obj. to be the same as the
parameter.
:P.
The first form of the &fn. sets the value of the
&obj. to be the same as the value of the
:ARG.str
&obj.:PERIOD.
:P.
The second form sets the value of the &obj. to the null-terminated
sequence of characters stored at
:ARG.pch
:PERIOD.
If the
:ARG.pch
parameter is &null., the &obj. is empty.
:RSLTS.
The &fn. returns a reference to the &obj. that was the target
of the assignment.
:SALSO.
:SAL typ='mfun'.operator~b+=
:SAL typ='ctor'.
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.operator ==
:SNPL.
:SNPFLF                  .#include <string.hpp>
:SNPFLF                  .public:
:SNPR index='operator =='.friend int operator ==( String const &amp.lft,
:SNPFLF                  .                        String const &amp.rht );
:SNPR index='operator =='.friend int operator ==( String const &amp.lft,
:SNPFLF                  .                        char const   *rht );
:SNPR index='operator =='.friend int operator ==( char const   *lft,
:SNPFLF                  .                        String const &amp.rht );
:SNPR index='operator =='.friend int operator ==( String const &amp.lft,
:SNPFLF                  .                        char          rht );
:SNPR index='operator =='.friend int operator ==( char          lft,
:SNPFLF                  .                        String const &amp.rht );
:eSNPL.
:SMTICS.
The &fn. compares two sequences of characters in terms of an
:ITALICS.equality
relationship.
:P.
A &obj. is equal to another &obj. if they have the same length and they
contain the same sequence of characters.  A &obj. and a C string are equal
if their lengths are the same and they contain the same sequence of
characters.  The C string is terminated by a null character.
A &obj. and a character are equal if the &obj. contains only that
character.
Upper-case and lower-case characters are considered different.
:RSLTS.
The &fn. returns a non-zero value if the lengths and sequences of
characters in the
:ARG.lft
and
:ARG.rht
parameter are identical, otherwise zero is returned.
:SALSO.
:SAL typ='mfun'.operator~b!=
:SAL typ='mfun'.operator~b<
:SAL typ='mfun'.operator~b<=
:SAL typ='mfun'.operator~b>
:SAL typ='mfun'.operator~b>=
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.operator >
:SNPL.
:SNPFLF                 .#include <string.hpp>
:SNPFLF                 .public:
:SNPR index='operator >'.friend int operator >( String const &amp.lft, String const &amp.rht );
:SNPR index='operator >'.friend int operator >( String const &amp.lft, char const   *rht );
:SNPR index='operator >'.friend int operator >( char const   *lft, String const &amp.rht );
:SNPR index='operator >'.friend int operator >( String const &amp.lft, char          rht );
:SNPR index='operator >'.friend int operator >( char          lft, String const &amp.rht );
:eSNPL.
:SMTICS.
The
&fn. compares two sequences of characters in terms of a
:ITALICS.greater-than
relationship.
:P.
:ARG.lft
is greater-than
:ARG.rht
if the characters of
:ARG.lft
occur after the characters of
:ARG.rht
in the collating sequence.
Upper-case and lower-case characters are considered different.
:RSLTS.
The &fn. returns a non-zero value if the
:ARG.lft
sequence of characters is greater than the
:ARG.rht
sequence, otherwise zero is returned.
:SALSO.
:SAL typ='mfun'.operator~b!=
:SAL typ='mfun'.operator~b==
:SAL typ='mfun'.operator~b<
:SAL typ='mfun'.operator~b<=
:SAL typ='mfun'.operator~b>=
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.operator >=
:SNPL.
:SNPFLF                  .#include <string.hpp>
:SNPFLF                  .public:
:SNPR index='operator >='.friend int operator >=( String const &amp.lft,
:SNPFLF                  .                        String const &amp.rht );
:SNPR index='operator >='.friend int operator >=( String const &amp.lft,
:SNPFLF                  .                        char const   *rht );
:SNPR index='operator >='.friend int operator >=( char const   *lft,
:SNPFLF                  .                        String const &amp.rht );
:SNPR index='operator >='.friend int operator >=( String const &amp.lft,
:SNPFLF                  .                        char          rht );
:SNPR index='operator >='.friend int operator >=( char          lft,
:SNPFLF                  .                        String const &amp.rht );
:eSNPL.
:SMTICS.
The &fn. compares two sequences of characters in terms of a
:ITALICS.greater-than or equal
relationship.
:P.
:ARG.lft
is greater-than or equal to
:ARG.rht
if the characters of
:ARG.lft
are equal to or occur after the characters of
:ARG.rht
in the collating sequence.
Upper-case and lower-case characters are considered different.
:RSLTS.
The &fn. returns a non-zero value if the
:ARG.lft
sequence of characters is greater than or equal to the
:ARG.rht
sequence, otherwise zero is returned.
:SALSO.
:SAL typ='mfun'.operator~b!=
:SAL typ='mfun'.operator~b==
:SAL typ='mfun'.operator~b<
:SAL typ='mfun'.operator~b<=
:SAL typ='mfun'.operator~b>
:eSALSO.
:eLIBF.
:P.
:CMT.========================================================================

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -