Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export slug related functions #40

Open
c9s opened this issue May 26, 2014 · 0 comments
Open

Export slug related functions #40

c9s opened this issue May 26, 2014 · 0 comments

Comments

@c9s
Copy link
Owner

c9s commented May 26, 2014

  1. int r3_parse_slugs( char * path, char ** slugs )
    this function parses the slug names from the path.
    this function returns the length of the slugs. each slug is a null-terminated strings.
int list_len = r3_parse_slugs("/user/{id}", token_list);
  1. r3_apply_slugs( char * path, ...)

    this function applies the variables into the slugs by the ordering. so an URL generator could be implemented.

        r3_apply_slugs("/user/{id}", 1, "123");
        r3_apply_slugs("/user/{id}/{title}", 2, "123", "title");
@c9s c9s added this to the 2.0 milestone Oct 26, 2015
@c9s c9s added the slug label Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant