Commit Graph

26 Commits

Author SHA1 Message Date
Ricky Zhou
fa3a2dd23b Allow nItems to take longs as well.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-05-19 00:58:07 -04:00
James Vega
58d308b54d Fix perlReToReplacer when \ is used in the replacement
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-03-12 17:17:20 -04:00
James Vega
0c42ea111a Fix our RE parsing to handle multiple backslashes before the separator
This also adds support for using brace pairs ({}, [], (), <>) as the
separators for m//.
2009-03-11 13:37:27 -04:00
James Vega
e787c7aa49 Clarify comment about timestamp() override 2009-03-11 13:37:26 -04:00
James Vega
880cce5505 src/utils/str.format: Recognize digits before the '.' in %f formatting. 2006-04-06 04:01:11 +00:00
James Vega
a3e4fc5b1d Change the modeline to use softtabstop instead of tabstop. 2006-02-11 15:52:51 +00:00
James Vega
7bfc9cbdd3 utils/str: Rename nth to ordinal and have it return the full string instead of just the ordinal ending. 2005-05-09 17:20:43 +00:00
Glen Mailer
7deadddbe8 utils.str.nth 2005-05-08 01:46:35 +00:00
James Vega
9971e991fe Fix the modelines. 2005-03-23 20:07:45 +00:00
George-Cristian Bîrzan
7aae5ae41e fix alternate separator with slash in first part of regexp 2005-03-17 19:51:24 +00:00
James Vega
aefcd594df Move structures to utils/ 2005-03-12 18:01:47 +00:00
Jeremy Fincher
dbd9e9f16c Added a %r handler (repr, just like normal string formatting). 2005-02-02 13:09:14 +00:00
Jeremy Fincher
f6e132dde4 Added test_format.py, added floating point formatting to format, and fixed a bug in the %t format. 2005-02-01 11:57:50 +00:00
Jeremy Fincher
f44be3b864 Allow timestamps in format to be None, indicating the current time. 2005-02-01 09:53:08 +00:00
Jeremy Fincher
74717061f2 Forgot to add u to the _formatRe. 2005-02-01 09:35:35 +00:00
Jeremy Fincher
4ac7bb4717 Added a %u specifier to format, for URLs. 2005-02-01 09:26:44 +00:00
Jeremy Fincher
2b6994428e Fixed a bug that was introduced in nItems. 2005-02-01 07:06:36 +00:00
James Vega
afc3c3f94a Fix some calls to pluralize to not use the extra argument. Also updated the pluralize tests. 2005-01-31 15:59:44 +00:00
James Vega
de89bf0265 Update usage of utils.str functions. 2005-01-31 14:52:27 +00:00
James Vega
47aa4c0f7c Remove the extra argument to utils.str.pluralize.
We previously had a second argument to utils.str.pluralize which determined
whether we truly plurazlied a word or not.  This has been removed so that
the function does what it says it does.
2005-01-31 13:37:47 +00:00
James Vega
9099a1a934 Update utils.str.format to support specifying an 'and' string. 2005-01-31 13:29:28 +00:00
Jeremy Fincher
5c72ded4a8 Stupid spelling error in a docstring. 2005-01-28 15:30:15 +00:00
Jeremy Fincher
a19a979499 Robustified and improved utils.str.format a bit; added a simple test. 2005-01-28 15:23:18 +00:00
Jeremy Fincher
90e901702b Moved toBool to go before format in utils/str.py. 2005-01-28 15:21:03 +00:00
Jeremy Fincher
34f1fe6562 Swapped the argument order for nItems *again*. 2005-01-28 15:17:26 +00:00
Jeremy Fincher
5fd6bbb52d Completely restructured our utils modules.
Tons of changes.  Here's the summary of things that matter most:

* There is no more supybot.fix.
* There is no more supybot.webutils; now there is supybot.utils.web.
  * It's no longer webutils.WebError, but just utils.web.Error.
* You shouldn't import itertools, ideally, but instead import utils.iter.
* No more using imap/ifilter in commands unless absolutely necessary.  It's
  premature optimization and annoying.
* utils.str.format isn't quite ready yet, but will be soon.  That'll be the
  next big thing to fix in our code.
2005-01-27 06:59:08 +00:00