All Questions
19 questions
6
votes
3
answers
985
views
A String View Library in C
I was recently working through the PintOS projects and became curious if there was a better way to do some string processing in C. Specifically, instead of strtok_r,...
8
votes
1
answer
4k
views
JavaScript string to Unicode (Hex)
This set of questions are related to a project I've published for converting characters, or strings, to Hex based Unicode; eg...
...
2
votes
0
answers
584
views
Reverse string in Kotlin
In the question of how to reverse a string in Java, a comment mentioned that combining Unicode code points need to be taken into account.
The below code works as intended for all test cases I tried. ...
6
votes
1
answer
549
views
Slices of Strings
In an attempt to summarize the question and all the good answers to this question, I decided to try to write a pair of string extensions that could
split a string in respect to number of slices
...
3
votes
2
answers
93
views
Password string generation
I'm trying to create passwords using the following snippet to match a custom password policy. I've added three gtr statements, at the end of the string, to ...
3
votes
3
answers
165
views
Filter out strings that are short or that are outside the alphabet of a language
I wrote this function to remove from the array those words that are less than n values. More precisely, I updated my old function and added some functionality. Since I am a beginner in this ...
2
votes
1
answer
375
views
Filtering user input to not contain a specific character
I need to filter an input from a user to never have the have the Pilcrow Sign (¶) character. The following methods filters the input from the user
...
1
vote
1
answer
151
views
Javascript browser charset rendering detection
I am attempting to polyfill the broken character encoding system in javascript. For example, characters such as 😒, have a length of 2 and are treated as 2 separate ...
3
votes
1
answer
1k
views
Unicode Conversions
This is the implementation I've been using to convert between unicode strings for a while. I basically pieced it together from information off the internet, including finding a work around for the bug ...
0
votes
1
answer
80
views
Interchange all occurrences of a character and its predecessor
Given a string like "abcdbcfbc" , I want all the occurrences of 'b' to be interchanged with their previous character.
The output should be: ...
3
votes
0
answers
234
views
Reduce encoded length of UTF-8 encoded Ruby string in C extension
I'm writing a Ruby extension in C. It's a string processing module working on UTF-8 encoded strings only.
One method, full_width_to_ascii!, converts full width ...
8
votes
1
answer
1k
views
Alternate letters to UpperCase
As an exercise I repeated this Java question, but in Go: Convert string to mixed case
The objective is for every second letter to be converted to uppercase.
Go string processing is relatively new to ...
1
vote
2
answers
397
views
Anchor Text String Transformation in Swift
I need to convert a string using these rules:
Downcase the string
Replace spaces, a blacklist of "invalid" chars, and non-ascii letters (like é) with -
Replace ...
7
votes
1
answer
10k
views
Removing accents from certain characters
I have a method that I am using to remove accents from certain characters. The problem is the massive slew of characters I am expected to work with. I have to, basically, remove accents from all Latin ...
7
votes
1
answer
262
views
Korean Romanization to Hangeul library
After a little work, I've finally ironed this out... Though could I get someone to go over this and see if there is a better way to present this library within the code, before I publish it?
Premise: ...