Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7c2fdda

Browse files
committed
Better and correct words for split().
1 parent 1e8b63e commit 7c2fdda

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

Doc/lib/libppath.tex

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,16 @@ \section{Standard Module \sectcode{posixpath}}
110110
\end{funcdesc}
111111

112112
\begin{funcdesc}{split}{p}
113-
Split the pathname \var{p} in a pair \code{(\var{head}, \var{tail})}, where
114-
\var{tail} is the last pathname component and \var{head} is
115-
everything leading up to that. If \var{p} ends in a slash (except if
116-
it is the root), the trailing slash is removed and the operation
117-
applied to the result; otherwise, \code{join(\var{head}, \var{tail})} equals
118-
\var{p}. The \var{tail} part never contains a slash. Some boundary
119-
cases:\ if \var{p} is the root, \var{head} equals \var{p} and
120-
\var{tail} is empty; if \var{p} is empty, both \var{head} and
121-
\var{tail} are empty; if \var{p} contains no slash, \var{head} is
122-
empty and \var{tail} equals \var{p}.
113+
Split the pathname \var{p} in a pair \code{(\var{head}, \var{tail})},
114+
where \var{tail} is the last pathname component and \var{head} is
115+
everything leading up to that. The \var{tail} part will never contain
116+
a slash; if \var{p} ends in a slash, \var{tail} will be empty. If
117+
there is no slash in \var{p}, \var{head} will be empty. If \var{p} is
118+
empty, both \var{head} and \var{tail} are empty. Trailing slashes are
119+
stripped from \var{head} unless it is the root (one or more slashes
120+
only). In nearly all cases, \code{join(\var{head}, \var{tail})}
121+
equals \var{p} (the only exception being when there were multiple
122+
slashes separating \var{head} from \var{tail}).
123123
\end{funcdesc}
124124

125125
\begin{funcdesc}{splitext}{p}

Doc/libppath.tex

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,16 @@ \section{Standard Module \sectcode{posixpath}}
110110
\end{funcdesc}
111111

112112
\begin{funcdesc}{split}{p}
113-
Split the pathname \var{p} in a pair \code{(\var{head}, \var{tail})}, where
114-
\var{tail} is the last pathname component and \var{head} is
115-
everything leading up to that. If \var{p} ends in a slash (except if
116-
it is the root), the trailing slash is removed and the operation
117-
applied to the result; otherwise, \code{join(\var{head}, \var{tail})} equals
118-
\var{p}. The \var{tail} part never contains a slash. Some boundary
119-
cases:\ if \var{p} is the root, \var{head} equals \var{p} and
120-
\var{tail} is empty; if \var{p} is empty, both \var{head} and
121-
\var{tail} are empty; if \var{p} contains no slash, \var{head} is
122-
empty and \var{tail} equals \var{p}.
113+
Split the pathname \var{p} in a pair \code{(\var{head}, \var{tail})},
114+
where \var{tail} is the last pathname component and \var{head} is
115+
everything leading up to that. The \var{tail} part will never contain
116+
a slash; if \var{p} ends in a slash, \var{tail} will be empty. If
117+
there is no slash in \var{p}, \var{head} will be empty. If \var{p} is
118+
empty, both \var{head} and \var{tail} are empty. Trailing slashes are
119+
stripped from \var{head} unless it is the root (one or more slashes
120+
only). In nearly all cases, \code{join(\var{head}, \var{tail})}
121+
equals \var{p} (the only exception being when there were multiple
122+
slashes separating \var{head} from \var{tail}).
123123
\end{funcdesc}
124124

125125
\begin{funcdesc}{splitext}{p}

0 commit comments

Comments
 (0)