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