1 Dec 2005 10:54
[string_algo] find_head/find_tail additions
Yuval Ronen <ronen_yuval <at> yahoo.com>
2005-12-01 09:54:38 GMT
2005-12-01 09:54:38 GMT
Hi. I have a feature I would like to see in the string algo library. The present find_head function gets an unsigned int N and returns the head of the input string with size is at most N. I would like another option that will return the head of the input with size at most original_size minus N. In other words, all the string without the last N characters. if original_size < N the return would be an empty string. The interface for such a functionality might introduce a new function (find_head_but()?), or make the present find_head function accept a signed int N, instead of unsigned int, with a negetive number indicates the new functionality. And of course the same for find_tail. Thanks, Yuval
RSS Feed