Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
c8a80cdb
Kaydet (Commit)
c8a80cdb
authored
Mar 25, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added docs for replace() and replace1().
üst
4fc70670
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
libstring.tex
Doc/lib/libstring.tex
+13
-0
libstring.tex
Doc/libstring.tex
+13
-0
No files found.
Doc/lib/libstring.tex
Dosyayı görüntüle @
c8a80cdb
...
...
@@ -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.
\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
been reimplemented in the built-in module
\code
{
strop
}
. However, you
should
\emph
{
never
}
import the latter module directly. When
...
...
Doc/libstring.tex
Dosyayı görüntüle @
c8a80cdb
...
...
@@ -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.
\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
been reimplemented in the built-in module
\code
{
strop
}
. However, you
should
\emph
{
never
}
import the latter module directly. When
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment