Browse Source

Updated readme text

master
parent
commit
fc6ccb1abd
  1. 15
      README.md

15
README.md

@ -21,16 +21,23 @@ int main() {
char* path = path_join(4, "//here", "there", "/over/there_as_well", "file.txt"); char* path = path_join(4, "//here", "there", "/over/there_as_well", "file.txt");
printf("Joined path: %s\n", path); printf("Joined path: %s\n", path);
char* parent = path_parent(path); char* parent = path_parent_copy(path);
printf("Parent: %s\n", parent); printf("Parent: %s\n", parent);
path_free(&path); path_free(&path);
char* parent_of_parent = path_parent(parent); // becomes parent of parent
printf("Parent of parent: %s\n", parent_of_parent); path_parent(parent);
printf("Parent of parent: %s\n", parent);
path_free(&parent); path_free(&parent);
path_free(&parent_of_parent);
char* windows_path = path_join(2, "C:\\Documents\\", "file.txt");
printf("Windows path: %s\n", windows_path);
path_to_native_separators(windows_path);
printf("Windows path with native separators: %s\n", windows_path);
path_free(&windows_path);
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }

Loading…
Cancel
Save