From c5198a91c7859e443a9dae7d267b998f337122e8 Mon Sep 17 00:00:00 2001 From: c9s Date: Sun, 18 May 2014 14:42:02 +0800 Subject: [PATCH] use pattern with slug --- README.md | 1 + tests/bench_str.csv | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 4a300fd..5e38b7a 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ r3_tree_insert_pathl(n , "/zoo" , strlen("/zoo") , NULL, &route_data r3_tree_insert_pathl(n , "/foo/bar" , strlen("/foo/bar") , NULL, &route_data ); r3_tree_insert_pathl(n , "/bar" , strlen("/bar") , NULL, &route_data ); r3_tree_insert_pathl(n , "/post/{id}" , strlen("/post/{id}") , NULL, &route_data ); +r3_tree_insert_pathl(n , "/user/{id}" , strlen("/user/{id:\\d+}") , NULL, &route_data ); // let's compile the tree! r3_tree_compile(n); diff --git a/tests/bench_str.csv b/tests/bench_str.csv index 354d81f..7dd3751 100644 --- a/tests/bench_str.csv +++ b/tests/bench_str.csv @@ -170,3 +170,4 @@ 1400394385,10413209.43 1400394571,8615372.65 1400394590,10964999.94 +1400394658,11173658.86