Re: [AD] al_path_set_extension

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Fri, February 13, 2009 6:00 pm, Peter Wang said:
> One way to resolve this is to define an extension to include the dot as
> well.  Then:
>
>     al_path_set_extension("abc", ".ext")     ==> "abc.ext"
>     al_path_set_extension("abc.ext", ".def") ==> "abc.def"
>     al_path_set_extension("abc.def", "")     ==> "abc"
>
> Then al_path_set_extension could be used to remove the extension.  Also
> the first call doesn't magically grow a dot character out of nowhere.
> al_path_get_extension would return the leading dot.
>
> What do you think?

Better than the current behaviour.

Trent :{)>




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/