path.h (531B)
- // utils-std: Collection of commonly available Unix tools
- // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- // SPDX-License-Identifier: MPL-2.0
- #include <stdbool.h>
- #include <stddef.h> // size_t
- // barebones basename, returns what's after the rightmost slash
- char *static_basename(char *path);
- // Modifies a path in-place to given a parent (dirname-like) and a child (basename-like)
- // optionally trims the tailing slashes prior to splitting
- char *path_split_static(char *path, bool trim);