Skip to main content
Code Review

Questions tagged [string-processing]

Use this tag when the presented code focuses on string manipulations (such as concatenation, splitting, and extracting parts of a string) or on analyzing and manipulating the contents of strings (e.g., searching, matching against a pattern, and encoding / decoding).

Filter by
Sorted by
Tagged with
5 votes
4 answers
491 views

I was looking at a Stack Overflow question and got somewhat carried away with improving the solution, well beyond the scope of that question. In summary, we have a string such as ...
2 votes
1 answer
165 views

Intro (This is the continuation of HuffmannEncoder.java - computing prefix codes for arbitrary (generic) alphabets.) (See the GitHub repository.) This time: I have fixed the misspelled ...
4 votes
2 answers
375 views

(See the continuation of this post at HuffmanEncoder.java - computing prefix codes for arbitrary (generic) alphabets - Take II.) I have this Java implementation of the Huffmann encoding. It looks like ...
4 votes
3 answers
497 views

Intro In this post, I will elaborate on A simple method for compressing white space in text (Java). Here, I have incorporated some advice offered by Chris. Also, this version preserves a single new ...
5 votes
1 answer
544 views

(The story continues in A simple method for compressing white space in text (Java) - Take II.) Intro Now I have that text space compressor. For example, ...
2 votes
2 answers
125 views

Intro I call two \$n\$-strings \$s\$ and \$z\$ over the alphabet \$\Sigma\$ weakly isomorphic if their character frequency multisets are equal. In other words, for an input strings \$s\,ドル we derive a ...
10 votes
3 answers
994 views

Intro This snippet is a translation of the Java version. Code string_util.hpp: ...
4 votes
1 answer
187 views

Intro Two \$n\$-strings \$s = \langle s_1 \ldots s_n \rangle \$ and \$z = \langle z_z \ldots z_n \rangle\$ are considered isomorphic if and only if there exists a bijection \$f\$ such that for all \$...
2 votes
0 answers
62 views

(See the previous and initial iteration.) Intro This time, I decided to pack the genomic data such that 4 nucleotide bases are encoded into a single byte. In other words, ...
4 votes
1 answer
112 views

(See the next iteration.) This time I have programmed a simple data structure called \$k\$-mer index. The actual word \$k\$-mer is a synonym of substring of length \$k\$. This data structure is built ...
5 votes
1 answer
347 views
5 votes
2 answers
117 views

I created a Python 3.11 utility that truncates an input string to a fixed word count—splitting on any whitespace, collapsing runs, and dropping trailing stop-words—so you get clean, concise snippets ...
5 votes
2 answers
186 views

Lately I came across a book exercise that asked to implement a calculator by resorting only to std::string manipulation. I avoided C++ streams as well, as they are ...
5 votes
1 answer
416 views

I'm working on a legacy code base and I came across a method in which I wanted to remove the chance of swallowing an exception. In the following I want to walk you through the refacoring process, ...

15 30 50 per page
1
2

AltStyle によって変換されたページ (->オリジナル) /