All Downloads are FREE. Search and download functionalities are using the official Maven repository.

z3-z3-4.13.0.src.util.file_path.h Maven / Gradle / Ivy

The newest version!
/*++
Copyright (c) 2017 Microsoft Corporation

Module Name:

    file_path.h

Abstract:

    File path functions.

Author:

    Nikolaj Bjorner (nbjorner) 2017-11-19

Revision History:

--*/
#pragma once
#include 

inline char const * get_extension(char const * file_name) {
    if (file_name == nullptr)
        return nullptr;
    char const * last_dot = nullptr;
    for (;;) {
        char const * tmp = strchr(file_name, '.');
        if (tmp == nullptr) {
            return last_dot;
        }
        last_dot  = tmp + 1;
        file_name = last_dot;
    }
}







© 2015 - 2024 Weber Informatics LLC | Privacy Policy