Skip to main content

Questions tagged [strings]

A string is a sequence of characters. It is commonly used to represent text or a sequence of bytes. Use this tag along with the appropriate programming language being used.

49 questions with no upvoted or accepted answers
6 votes
0 answers
4k views

I have implemented this MIPS code to determine the length of given ASCII character strings. Is there a simpler way to implement this code? Is there is a built-in function in MIPS? Given String: ...
Adam's user avatar
  • 405
6 votes
0 answers
894 views

I wrote some code to parse Lua 5.2 strings in Lua 5.1, using patterns. It works perfectly as far as I tested. ...
SoniEx2's user avatar
  • 181
5 votes
0 answers
877 views

Tired of always having problems in reading arbitrary length lines from file under Windows, I tried to write a POSIX getdelim() and ...
Costantino Grana's user avatar
4 votes
0 answers
88 views

I have reworked the code from my previous (linked) post. For reference: I have a string which contains JSON-like object flattened (stringify()ed). I need to JSON-...
user3132457's user avatar
4 votes
0 answers
69 views

I wrote this code as a reference implementation for this challenge. How can I make it more readable and/or efficient? The goal is to take an integer and create patterns like the following: ...
emanresu A's user avatar
4 votes
0 answers
180 views

I just finished making an implementation of a SHA256 hashing function (https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf) in Rust and I was looking for some feedback. As far as I can tell it ...
user668074's user avatar
4 votes
0 answers
77 views

As a first project in Rust, I'm translating an existing, working piece of Python code. This code's purpose is to convert a 15-character Salesforce Id (which is guaranteed to be ASCII, exactly 15 bytes ...
David Reed's user avatar
4 votes
0 answers
189 views

Following the successful review of my previous implementation. Please review my new, generic implementation of the Knuth-Morris-Pratt algorithm. Its modified to search a source of indeterminate ...
Jodrell's user avatar
  • 539
4 votes
0 answers
323 views

This code gives the solution to Part 1 of this question: http://adventofcode.com/2016/day/9 Summary: You have to find the length of the input string after using the markers to duplicate parts of it. ...
Light Drake's user avatar
4 votes
0 answers
169 views

I had a look on Stack Overflow etc. on how to perform a contains ignore case with n given strings. Most answers suggested using regex for this task. Although it's a valid option, I prefer doing upper-...
u6f6o's user avatar
  • 291
3 votes
0 answers
284 views

I am seeking a review of my command line wordle game. Having only recently started exploring functional programming, I expect that there will be no shortage of areas to improve. This is my first ...
Adam Hodgson's user avatar
3 votes
0 answers
87 views

I'm currently designing a class template to represent scientific notation or a floating-point number system. There are currently 4 distinct types: BIN, ...
Francis Cugler's user avatar
3 votes
0 answers
466 views

I am trying to find a way to optimize the code runtime. Improvements I have implemented include using dictionaries, removing redundancies and using str.translate. <...
BernardL's user avatar
  • 131
3 votes
0 answers
114 views

I need to count the number of substrings of s which contains both the strings a and b. This ...
Ankur's user avatar
  • 305
3 votes
0 answers
256 views

I have a list of strings to search along with a list of words and want to produce boolean feature vectors indicating presence of each word within the strings. What is the fastest way to build these ...
Danny Friar's user avatar

15 30 50 per page