Mercurial > projects > mde
view mde/text/util.d @ 2:78eb491bd642
mergetag: partially redesigned dataset and text reader classes. Changed text format.
committer: Diggory Hardy <diggory.hardy@gmail.com>
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sat, 03 Nov 2007 15:15:43 +0000 |
parents | 18491334a525 |
children | 9a990644948c |
line wrap: on
line source
/******************************************************* * A collection of text utility functions. * ******************************************************/ module mde.text.util; T postTrim(T) (T str) { uint i = str.length; for (uint j; i > 0; i = j) { j = i - 1; if (str[j] != ' ' || str[j] != '\t') break; } return str[0..i]; }