Collapse All

Anypia Programmer's Documentation |  |

Path::changeExtension Method
Path Class Path Members Path Methods Send Feedback

Changes the extension of a path string.

C++

    static std::string changeExtension(
        const std::string& path,
        const std::string& extension
    );

Parameters

Parameters | Description
const std::string& path | The path information to modify.
const std::string& extension | The new extension (with a leading period).

Returns

The string containing the modified path information.

Remarks

If the extension argument is empty or consists solely of a period, this function removes any existing extension. Otherwise, if neither path nor extension contains a period, this function adds the period. Then the rest of the extension argument after the period is added.

Group

Path Methods

Links
Path Class, Path Members, Path Methods

Copyright (c) 2010. All rights reserved.
Contents | Index | Home
What do you think about this topic? Send feedback!