[Python-bugs-list] [ python-Feature Requests-587534 ] String method: Cutoff

noreply@sourceforge.net noreply@sourceforge.net
Mon, 29 Jul 2002 02:20:57 -0700


Feature Requests item #587534, was opened at 2002-07-27 22:56
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=587534&group_id=5470

Category: None
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: PK Wong (ssfsx17)
>Assigned to: Michael Hudson (mwh)
Summary: String method: Cutoff

Initial Comment:
string.cutoff_front(string, i)
Takes string and cuts off the first i 
characters. Returns the shortened 
result.

string.cutoff_back(string, i)
Takes string and 
cuts off the last i characters. Returns the shortened result.

I 
was reading the documentation for the string module and did not 
see any such method. Therefore, I would like for these methods to 
be a part of the string module.

----------------------------------------------------------------------

>Comment By: Michael Hudson (mwh)
Date: 2002-07-29 09:20

Message:
Logged In: YES 
user_id=6656

Umm, you know about slices?

"hello"[1:] --> "ello"
"hello"[:-1] --> "hell"

etc.  Rejecting unless a surprisingly compelling argument
turns up.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=587534&group_id=5470