Re: [AD] al_path_set_extension |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] al_path_set_extension
- From: "Trent Gamblin" <trent@xxxxxxxxxx>
- Date: Fri, 13 Feb 2009 19:40:56 -0700 (MST)
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 :{)>