While replacing the extension with an empty string works, it required a redundant string-size argument which took a dummy value in some cases. Avoid having to pass in a redundant string size by adding a function that strips the extension.