Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Posts tagged string

6 child tags

Use for questions dealing with a finite sequence of symbols (characters), commonly used for text.

This tag doesn't have a detailed wiki yet.

66%
+2 −0
Q&A How can I manage multiple consecutive strings in a buffer (and add more later)?

This question is inspired by If I have a char array containing strings with a null byte (\0) terminating each string, how would I add another string onto the end? on Stack Overflow. Suppose I have...

2 answers  ·  posted 30d ago by Karl Knechtel‭  ·  last activity 29d ago by Lundin‭

Question c string
66%
+2 −0
Code Reviews A small header-only input output library

The library (inspired by stb libraries) attempts to provide some commonly used functions (reading a file into memory, determining the size of a file) that are missing from the C standard library po...

0 answers  ·  posted 2mo ago by Melkor-1‭  ·  edited 1mo ago by Melkor-1‭

Question c string input output
88%
+14 −0
Q&A How does Zalgo Text work, and how can I prevent my application from accepting it?

A Zalgo Text is something like this: T̃͟͏̧̟͓̯̘͓͙͔o̤̫͋ͯͫ̂ ̥͍̫̻͚̦͖͇̌ͪ̇ͤ̑̐͋̾̕i̢͖̩͙͐͑ͬ̄̿̍̚ͅn̵̢̼̙̳̒̄ͥ̋̐v̡̟̗̹̻̜͕̲ͣ̐ͤͤ͒́oͫ͂̆͑ͩ҉͇̰͚̹̠̫͔̗k̷̭̬̭͙̹̺̯ͩ̌̾̒̋̓ͤ͛͘͠e̥͙̓̄̕ ̵̫͈ͪţ̱̺̺̑̿̉̌͛̂̇h͙̣̬̓̂͞ę̡̲̟͎͉̟͛̓̉̆̉͘ ͬ̒...

1 answer  ·  posted 3y ago by hkotsubo‭  ·  last activity 5mo ago by hkotsubo‭

Question string character
66%
+2 −0
Q&A Escape both reserved characters and curly braces in a URI in Spring Boot

I need to pass URI's that contain special characters, using Spring Boot. The characters include spaces, curly braces ({ and }), square brackets ([ and ]), and hash signs (#). The problem is that ...

1 answer  ·  posted 6mo ago by FractionalRadix‭  ·  last activity 6mo ago by FractionalRadix‭

66%
+4 −1
Q&A How can I build a string from smaller pieces?

Suppose I have some variables like: >>> count = 8 >>> status = 'off' I want to combine them with some hard-coded text, to get a single string like 'I have 8 cans of Spam®; b...

2 answers  ·  posted 9mo ago by Karl Knechtel‭  ·  last activity 9mo ago by Karl Knechtel‭

50%
+1 −1
Q&A Count the number of occurrences in a text string

If I have some text in a cell, how can I find the number of times another piece of text appears in it? For example, suppose A1 contains Peter Piper picked a peck of pickled peppers.. pick occurs 2...

2 answers  ·  posted 3y ago by pnuts‭  ·  last activity 10mo ago by Dirk Herrmann‭

77%
+5 −0
Code Reviews stpecpy(): Design a better string copy function that truncates

I was directed a few days ago to a post about a string copy function, which IMO improves the commonly known string copy functions, including strlcpy(3BSD), strlcat(3BSD), and strscpy(9). It define...

2 answers  ·  posted 2y ago by alx‭  ·  last activity 1y ago by alx‭

23%
+1 −8
Q&A How to efficiently remove every occurrence of one string inside another

I have two strings and want to remove every occurrence of the second string inside the first one starting from the beginning of the first string and as if each occurrence was removed immediately. ...

1 answer  ·  posted 2y ago by dumplings‭  ·  edited 2y ago by __blackjack__‭

80%
+6 −0
Q&A array of arrays vs array of pointers to store array of string literals

Let's consider the following code: const char a[][4] = {"aa", "aaa"}; const char *b[] = {"bb", "bbb"}; const char *const c[] = {"cc", "ccc"}; For shared libraries, both b and c arrays require...

0 answers  ·  posted 2y ago by alx‭  ·  edited 2y ago by alx‭

85%
+10 −0
Q&A Vim: how to search for all instances of a string, except for those that are between two specific strings

Using Vim, I am trying to search for all instances of a specific string, except for those that fall somewhere in between two other specific strings. For example, I want to determine all instances ...

2 answers  ·  posted 2y ago by Trevor‭  ·  last activity 2y ago by Dirk Herrmann‭

70%
+5 −1
Q&A Delete all occurrences of a character in a webpage with vanilla JavaScript

Primarily for learning, I would like to try to delete a specific character (letter or number or special character), wherever it is in a webpage, with vanilla JavaScript. The webpage won't change a...

3 answers  ·  posted 2y ago by deleted user  ·  last activity 2y ago by hkotsubo‭

Question javascript replace
66%
+2 −0
Q&A Understanding createTreeWalker method in the context of replacing strings (or parts of them)

I want to ensure I understand the following code; credit to user:m3g4p0p on Sitepoint, for this code: const walker = document.createTreeWalker( document.body, NodeFilter.SHOW_TEXT ) let...

1 answer  ·  posted 2y ago by deleted user  ·  last activity 2y ago by hkotsubo‭

77%
+5 −0
Q&A Common string handling pitfalls in C programming

Preface: This is a self-answered Q&A meant as a C string handling FAQ. It will ask several question at once which isn't ideal, but they are all closely related and I'd rather not fragment the p...

1 answer  ·  posted 2y ago by Lundin‭  ·  last activity 2y ago by Lundin‭

60%
+4 −2
Q&A Separate digits of a number in groups with different sizes

I have a list of 11-digit numbers stored in one single column in Excel, and I need to separate the digits according to this pattern: 2-2-1-3-3. Example: 00002451018 becomes 00 00 2 451 018. How c...

2 answers  ·  posted 2y ago by sfrow‭  ·  edited 2y ago by Alexei‭

66%
+4 −1
Q&A How to get string length in D?

I'm new to D and am planning to use it for golfing. I want to make a ROT13 converter and I want to determine the length of an inputted string. Is there a function for this? If not, what ways can I...

3 answers  ·  posted 2y ago by General Sebast1an‭  ·  last activity 2y ago by hkotsubo‭

Question string function d
50%
+1 −1
Q&A Input taking only first character of a string

I wrote a program named Kernel.c 2 months into my life in programming and created 4 functions at the time, and now there are 7 functions. Recently, I updated the program completely onto an online ...

1 answer  ·  posted 3y ago by General Sebast1an‭  ·  last activity 3y ago by elgonzo‭

Question c string input
50%
+0 −0
Q&A How to calculate the Hamming weight of a binary string?

A presently unanswered question on Stack Overflow asks: Does there exist a popcount function in libreoffice calc? and clarifies that "I often use BASE(A1;2;8) to show a number in binary".

1 answer  ·  posted 3y ago by pnuts‭  ·  last activity 3y ago by Alexei‭

80%
+6 −0
Q&A Multiple string concatenation in Excel

In Excel I would like to concatenate several strings into one. I could type and fill in the blanks CONCATENATE(A1, A2, ....) but it is a lot of work This would be cool, but it does not work CONCATE...

2 answers  ·  posted 3y ago by James Jenkins‭  ·  last activity 3y ago by Alexei‭

44%
+2 −3
Q&A Help me understand why python3 string.format() raises Attribute error [closed]

I'd like some help understanding why the third call to print() raises AttributeError: 'NoneType' object has no attribute 'format' from os import path import inspect def myfunction(): pri...

0 answers  ·  posted 3y ago by Greg‭  ·  closed 3y ago by Alexei‭

84%
+9 −0
Q&A How to override default string formatter?

It is possible to create a new formatter class by subclassing string.Formatter class and then to use it like myformatter.format("{foo:customformat}", foo=foo). It's not super-convenient though, and...

1 answer  ·  posted 3y ago by luser‭  ·  edited 3y ago by Alexei‭

75%
+4 −0
Q&A What is a standard definition (or a CS theory based formal definition) for Escaping?

I personally would define "escaping" in software development in general and coding in particular as follows: Making an exception to match data which otherwise would not be allowed to be matched: I...

1 answer  ·  posted 3y ago by deleted user  ·  edited 3y ago by Alexei‭

Question string escaping
50%
+4 −4
Q&A Is concatenation a logical AND?

As a person with no significant background in mathematics and computer science I thought that concatenation and AND are logically identical if not very similar because both add something to somethi...

3 answers  ·  posted 3y ago by deleted user  ·  edited 3y ago by deleted user

86%
+11 −0
Q&A Does using an Integer have any speed/performance benefits over a string in JSON

I'm working on an API to respond some data about a bunch of orders and items. The order and item numbers are always an integer (it's the order.id and item.id value, respectively). Originally the re...

3 answers  ·  posted 3y ago by Welz‭  ·  last activity 3y ago by .                                                .‭