mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Added docs for replace() and replace1().
This commit is contained in:
		
							parent
							
								
									4fc7067055
								
							
						
					
					
						commit
						c8a80cdbad
					
				
					 2 changed files with 26 additions and 0 deletions
				
			
		| 
						 | 
					@ -227,6 +227,19 @@ Pad a numeric string on the left with zero digits until the given
 | 
				
			||||||
width is reached.  Strings starting with a sign are handled correctly.
 | 
					width is reached.  Strings starting with a sign are handled correctly.
 | 
				
			||||||
\end{funcdesc}
 | 
					\end{funcdesc}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					\begin{funcdesc}{replace}{old, new, str}
 | 
				
			||||||
 | 
					Return a copy of string \var{str} with all occurrences of substring
 | 
				
			||||||
 | 
					\var{old} replaced by \var{new}.
 | 
				
			||||||
 | 
					\end{funcdesc}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					\begin{funcdesc}{replace1}{old, new, str\optional{, start\optional{, end}}}
 | 
				
			||||||
 | 
					Return a copy of string \var{str} with the first occurrence of
 | 
				
			||||||
 | 
					substring \var{old} replaced by \var{new}.  If no occurrence is found,
 | 
				
			||||||
 | 
					\var{str} is returned unchanged.  Optional arguments \var{start} and
 | 
				
			||||||
 | 
					\var{end} limit the search for \var{old} like for \code{find} (they
 | 
				
			||||||
 | 
					are not used to slice the result).
 | 
				
			||||||
 | 
					\end{funcdesc}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This module is implemented in Python.  Much of its functionality has
 | 
					This module is implemented in Python.  Much of its functionality has
 | 
				
			||||||
been reimplemented in the built-in module \code{strop}.  However, you
 | 
					been reimplemented in the built-in module \code{strop}.  However, you
 | 
				
			||||||
should \emph{never} import the latter module directly.  When
 | 
					should \emph{never} import the latter module directly.  When
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -227,6 +227,19 @@ Pad a numeric string on the left with zero digits until the given
 | 
				
			||||||
width is reached.  Strings starting with a sign are handled correctly.
 | 
					width is reached.  Strings starting with a sign are handled correctly.
 | 
				
			||||||
\end{funcdesc}
 | 
					\end{funcdesc}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					\begin{funcdesc}{replace}{old, new, str}
 | 
				
			||||||
 | 
					Return a copy of string \var{str} with all occurrences of substring
 | 
				
			||||||
 | 
					\var{old} replaced by \var{new}.
 | 
				
			||||||
 | 
					\end{funcdesc}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					\begin{funcdesc}{replace1}{old, new, str\optional{, start\optional{, end}}}
 | 
				
			||||||
 | 
					Return a copy of string \var{str} with the first occurrence of
 | 
				
			||||||
 | 
					substring \var{old} replaced by \var{new}.  If no occurrence is found,
 | 
				
			||||||
 | 
					\var{str} is returned unchanged.  Optional arguments \var{start} and
 | 
				
			||||||
 | 
					\var{end} limit the search for \var{old} like for \code{find} (they
 | 
				
			||||||
 | 
					are not used to slice the result).
 | 
				
			||||||
 | 
					\end{funcdesc}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This module is implemented in Python.  Much of its functionality has
 | 
					This module is implemented in Python.  Much of its functionality has
 | 
				
			||||||
been reimplemented in the built-in module \code{strop}.  However, you
 | 
					been reimplemented in the built-in module \code{strop}.  However, you
 | 
				
			||||||
should \emph{never} import the latter module directly.  When
 | 
					should \emph{never} import the latter module directly.  When
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue