/[gentoo]/src/packages/mstring.py
Gentoo

Contents of /src/packages/mstring.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1.2.1 - (show annotations) (download) (as text) (vendor branch)
Tue Oct 4 03:17:31 2005 UTC (8 years, 9 months ago) by marduk
Branch: pre_2-0
Changes since 1.1.1.1: +10 -7 lines
File MIME type: text/x-python
This is the development code for what will eventually become version 2.0
of packages.gentoo.org (P2).  Finally commiting to CVS. It is mostly a
complete re-write, which explains the multitude of removals and additions.
The new code will use the Quixote framework
http://www.mems-exchange.org/software/quixote/

1 """marduk's helpin' heap 'o string functions"""
2
3
4 def replace_sub(string, new, start, end=None):
5 """Replacing substring of s with new, return new string, and position
6 directly after substitution
7 """
8 if end is None:
9 end = start
10 string2 = string[:start] + new + string[end + 1:]
11 newpos = start + len(new)
12
13 return (string2, newpos)

  ViewVC Help
Powered by ViewVC 1.1.20