From 0c8185567d8f0c9353687496224a5f6d8ea0b2b7 Mon Sep 17 00:00:00 2001 From: Alex Groce Date: Fri, 4 Jan 2019 12:35:06 -0700 Subject: [PATCH] comment clarifying example --- README.md | 3 ++- examples/Runlen.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0323f60..f55104a 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,8 @@ things aren't working without that option). using namespace deepstate; /* Simple, buggy, run-length encoding that creates "human readable" - * encodings by adding 'A'-1 to the count, and splitting at 26 */ + * encodings by adding 'A'-1 to the count, and splitting at 26. + * e.g., encode("aaabbbbbc") = "aCbEcA" since C=3 and E=5 */ char* encode(const char* input) { unsigned int len = strlen(input); diff --git a/examples/Runlen.cpp b/examples/Runlen.cpp index 10264b2..2b2396c 100644 --- a/examples/Runlen.cpp +++ b/examples/Runlen.cpp @@ -3,7 +3,8 @@ using namespace deepstate; /* Simple, buggy, run-length encoding that creates "human readable" - * encodings by adding 'A'-1 to the count, and splitting at 26 */ + * encodings by adding 'A'-1 to the count, and splitting at 26. + * e.g., encode("aaabbbbbc") = "aCbEcA" since C=3 and E=5 */ char* encode(const char* input) { unsigned int len = strlen(input);