4 ms·
Exactly what I was thinking. You look for the last slash and truncate.
by ape4 10y ago
Exactly what I was thinking. You look for the last slash and truncate.
- ugexe 10y agoThis is a naive solution. Try using that on windows.
- ajmurmann 10y agoThis actually makes me wonder if it would be worthwhile to look for this and similar issues and remove Windows support from the methods for a custom implementation. It might shave off some more time.
- ape4 10y agoStill, use a pattern to find the last slash or backslash. Should be pretty quick.