summaryrefslogtreecommitdiffhomepage
path: root/examples/sso_substr.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sso_substr.c')
-rw-r--r--examples/sso_substr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/sso_substr.c b/examples/sso_substr.c
index ea10c411..be372a8d 100644
--- a/examples/sso_substr.c
+++ b/examples/sso_substr.c
@@ -4,7 +4,7 @@
int main ()
{
- cstr str = cstr_new("We think in generalities, but we live in details.");
+ cstr str = cstr_lit("We think in generalities, but we live in details.");
csview sv1 = cstr_substr_ex(&str, 3, 5); // "think"
size_t pos = cstr_find(&str, "live"); // position of "live"
csview sv2 = cstr_substr_ex(&str, pos, 4); // "live"