Skip to content

rich-97/path-tools-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tools for paths

simple use:

#include <stdio.h>
#include <stdlib.h>
#include "path-tools-c/path.h"

int main (void) {
  char str[] = "/var/www/index.php";

  // Struct path
  path your_path;
  
  parser_path(&your_path, str);
  
  printf("%s\n", your_path.dirname); // /var/www
  printf("%s\n", your_path.basename); // index.php
  printf("%s\n", your_path.extname); // .php
  return EXIT_SUCCESS; 
}

Compile and execute:

gcc main.c path-tools-c/path.c -o main; ./main

About

Tools for manipuling paths with c.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published