Anonymous user
Talk:Find common directory path: Difference between revisions
New version. Ignore the old one.
m (Rename the function to avoid the implication that it finds the shortest common path (which would be much simpler).) |
(New version. Ignore the old one.) |
||
Line 1:
<lang C>
Line 8:
static void longestSharedPath(const char *fixed, char *moving) {
char *t;
unsigned n =
moving[n] = '\0';
t = strrchr(moving, '/');
|