Re: [PHP-DEV] [phpbugs@priorwebsites.com: Bug #16681 Updated: Requestnew words(), word(), wordindex(), wordlength() functions]

2002-04-19 Thread Gabriel Ricard

Markus Fischer wrote:

> word (str, num) 
> Returns the num'th word from string str. If num is greater than the
> number of words in str, the null string is returned. 

We've implemented a userland function like this for some code at work 
and I welcome an implementation in C. The only thing I'd add is an 
optional field one could use to change the character that separates the 
words in the sentence. But perhaps that makes it a bit too close to a 
str_* type function, like explode().

-- 
Gabriel Ricard
[EMAIL PROTECTED]


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] [phpbugs@priorwebsites.com: Bug #16681 Updated: Requestnew words(), word(), wordindex(), wordlength() functions]

2002-04-19 Thread derick

Hey,

why not make a PEAR thingy for this?

Derick

On Fri, 19 Apr 2002, Daniel Lorch wrote:

> hi,
> 
> > Well, I like the idea(s).
> 
> > I think returning (bool)false instead of NULL is more
> > consistent though.
> 
> > Maybe the naming convention should be changed to:
> 
> ..while paying attention to english orthography:
> 
> > word()
> > word_count()
> > word_index()
> > word_lenght()
> 
> word_length()
> 
> common pitfall - maybe we should provide an alias? :)
> 
> > - Markus
> 
> word_* functions can be easily solved in userland, but nevertheless,
> after thinking about it, it might be a good addition. At least it does
> not hurt anyone, does it? :)
> 
> -daniel
> 
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

---
 Did I help you? Consider a gift:
  http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
---
  PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php