Skip to content

Commit

Permalink
[string.view.ops] convert Effects to Returns paragraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
Eisenwave committed Feb 22, 2024
1 parent 30debb0 commit f89cd95
Showing 1 changed file with 25 additions and 28 deletions.
53 changes: 25 additions & 28 deletions source/strings.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@

\pnum
\effects
Equivalent to \tcode{traits::copy(s, data() + pos, rlen)}.
Equivalent to: \tcode{traits::copy(s, data() + pos, rlen)}.

\pnum
\returns
Expand Down Expand Up @@ -1262,8 +1262,8 @@

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return substr(pos1, n1).compare(str);}
\returns
\tcode{substr(pos1, n1).compare(str)}.
\end{itemdescr}

\indexlibrarymember{compare}{basic_string_view}%
Expand All @@ -1274,8 +1274,8 @@

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return substr(pos1, n1).compare(str.substr(pos2, n2));}
\returns
\tcode{substr(pos1, n1).compare(str.substr(pos2, n2))}.
\end{itemdescr}

\indexlibrarymember{compare}{basic_string_view}%
Expand All @@ -1285,8 +1285,8 @@

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return compare(basic_string_view(s));}
\returns
\tcode{compare(basic_string_view(s))}.
\end{itemdescr}

\indexlibrarymember{compare}{basic_string_view}%
Expand All @@ -1296,8 +1296,8 @@

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return substr(pos1, n1).compare(basic_string_view(s));}
\returns
\tcode{substr(pos1, n1).compare(basic_string_view(s))}.
\end{itemdescr}

\indexlibrarymember{compare}{basic_string_view}%
Expand All @@ -1307,8 +1307,8 @@

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return substr(pos1, n1).compare(basic_string_view(s, n2));}
\returns
\tcode{substr(pos1, n1).compare(basic_string_view(s, n2))}.
\end{itemdescr}

\indexlibrarymember{starts_with}{basic_string_view}%
Expand All @@ -1321,8 +1321,8 @@
Let \tcode{rlen} be the smaller of \tcode{size()} and \tcode{x.size()}.

\pnum
\effects
Equivalent to: \tcode{return basic_string_view(data(), rlen) == x;}
\returns
\tcode{basic_string_view(data(), rlen) == x}.
\end{itemdescr}

\indexlibrarymember{starts_with}{basic_string_view}%
Expand All @@ -1332,8 +1332,8 @@

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return !empty() \&\& traits::eq(front(), x);}
\returns
\tcode{!empty() \&\& traits::eq(front(), x)}.
\end{itemdescr}

\indexlibrarymember{starts_with}{basic_string_view}%
Expand All @@ -1343,8 +1343,8 @@

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return starts_with(basic_string_view(x));}
\returns
\tcode{starts_with(basic_string_view(x))}.
\end{itemdescr}

\indexlibrarymember{ends_with}{basic_string_view}%
Expand All @@ -1357,11 +1357,8 @@
Let \tcode{rlen} be the smaller of \tcode{size()} and \tcode{x.size()}.

\pnum
\effects
Equivalent to:
\begin{codeblock}
return basic_string_view(data() + (size() - rlen), rlen) == x;
\end{codeblock}
\returns
\tcode{basic_string_view(data() + (size() - rlen), rlen) == x}.
\end{itemdescr}

\indexlibrarymember{ends_with}{basic_string_view}%
Expand All @@ -1371,8 +1368,8 @@

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return !empty() \&\& traits::eq(back(), x);}
\returns
\tcode{!empty() \&\& traits::eq(back(), x)}.
\end{itemdescr}

\indexlibrarymember{ends_with}{basic_string_view}%
Expand All @@ -1382,8 +1379,8 @@

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return ends_with(basic_string_view(x));}
\returns
\tcode{ends_with(basic_string_view(x))}.
\end{itemdescr}

\indexlibrarymember{contains}{basic_string_view}%
Expand All @@ -1395,8 +1392,8 @@

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return find(x) != npos;}
\returns
\tcode{find(x) != npos}.
\end{itemdescr}

\rSec3[string.view.find]{Searching}
Expand Down

0 comments on commit f89cd95

Please sign in to comment.