www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - replacement for rfind in 2.058

reply "Jay Norwood" <jayn prismnet.com> writes:
I see rfind is deprecated and std.regexp is deprecated, and no 
rfind in std.string, so is there some equivalent operation in 
std.regex?
Feb 19 2012
parent "Jay Norwood" <jayn prismnet.com> writes:
On Sunday, 19 February 2012 at 18:55:21 UTC, Jay Norwood wrote:
 I see rfind is deprecated and std.regexp is deprecated, and no 
 rfind in std.string, so is there some equivalent operation in 
 std.regex?
I was trying to rebuild bud wit 2.058, and so at around line 2078 I replaced the rfind by using lastIndexOf. I suppose this is what was intended to be the replacement for this particular case, since it wasn't using a RegExp originally. version (Windows) { int DotPos; DotPos = std.string.lastIndexOf(vAppName, '.'); if (DotPos != -1) { vAppName.length = DotPos; } }
Feb 19 2012