digitalmars.D.learn - replacement for rfind in 2.058
- Jay Norwood (3/3) Feb 19 2012 I see rfind is deprecated and std.regexp is deprecated, and no
- Jay Norwood (14/17) Feb 19 2012 I was trying to rebuild bud wit 2.058, and so at around line 2078
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
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