Skip to main content
Advice
0 votes
7 replies
55 views

C++ std::string short string optimization detection

If you have a string std::string data("This is a string long enough so that it is not a short string"); Then you have a view onto that string: std::string_view dataView(std::begin(...
Loki Astari's user avatar
-2 votes
1 answer
169 views

How does comparing string::npos to int work? [closed]

The code given below runs well. But, I wanted to know that how string::npos value is being compared to a small int. When b is a sub-string of a, findValue returns the sub-string's starting index. ...
Tanzil Ahmed's user avatar
0 votes
3 answers
85 views

How to get from a url string the path to a file with a FOR loop in a Windows batch file?

Given is a string which is a url of a file, e.g. http://url.com/file.zip. I want to extract the path without the file name, i.e. http://url.com/. My idea for doing this was to break down the string ...
C4lculated's user avatar
-7 votes
2 answers
205 views

My code fails to compile with "no match for 'operator=='" error [closed]

I tried using the std::getline() function with a vector, and I want to make something that turns the following user input: 3 AA AA BB BB CC CC into the following output: AA AA, BB BB, and CC CC [...
BAMA DWI MUSAYA's user avatar
1 vote
2 answers
82 views

Transforming a UTF-8 string in a const context

I have a function capable of translating UTF-8 characters into a custom 8-bit encoding: const fn char_to_custom_encoding(c: char) -> u8; I'd like to apply it at compile time to a string literal so ...
val - disappointed in SE's user avatar
0 votes
0 answers
53 views

Powershell script to replace a single carriage return [duplicate]

I am importing a web order CSV file into our in-house database. Usually it's ok but, if the user enters special delivery instructions, the csv file includes the string "help.", followed by ...
Gil Fleming's user avatar
2 votes
0 answers
75 views

Problem with characters and cmp in x86_64 assembly language (AT&T) [duplicate]

I'm having trouble writing what should be a simple character counting program. Here's the file with the .data section, as given by the author of Learn to Program with Assembly, which I'm following (I ...
Andrew Boone's user avatar
1 vote
2 answers
137 views

How to show true string in Access VBA Listbox

I have here a listbox showing data from tbl2026Test table (with ID as its own autonumber) by a simple listbox rowsource code: Dim statInProg, statPClarif As String statInProg = "In Progress" ...
Shiela's user avatar
  • 785
2 votes
2 answers
102 views

Pointers, referencing, and dereferencing static strings in assembly language

I'm writing a little toy program to try to help myself better understand this language (AT&T syntax, x86_64 assembly language). Consider this code, if you'll be so kind: .section .data mystring: ....
Andrew Boone's user avatar
1 vote
1 answer
174 views

Format() Entire Strings (Rather Than Characters)

Background VBA has a Format() function which converts any value to its textual representation. This is useful for numbers and Dates and times, but it can also be used on Strings. Debug.Print Format(&...
Greg's user avatar
  • 3,368
0 votes
1 answer
158 views

Set placeholder in a String "equals" check

I've got two lists in my Java app: The first contains commands, the second the according valid replies, which I compare to the actual replies: private final String[] commands = {"Do something&...
Neph's user avatar
  • 2,013
0 votes
3 answers
103 views

How to slice first char from all iterable records in a string (converted from list)

I'm trying to remove the first/last two characters of each iterable record in a string (which I converted from a list and split into separate lines). newString = "\n".join([str(item) for ...
Python Journeyman's user avatar
1 vote
1 answer
164 views

String manipulation in R, conditional capture and conditional append. ?regex solution

I am using hospital data. I want to make a regex expression in R and I am struggling to do this without using string manipulation outside of a single regex expression. The string I want to search is: &...
JisL's user avatar
  • 333
3 votes
1 answer
83 views

Replace part of strings with corresponding values from table in R

I have a list of file names that encode some information as a time stamp. I would like to replace the time stamp with the appropriate corresponding information, while retaining the rest of the ...
Brian Fisher's user avatar
  • 1,398
5 votes
2 answers
86 views

unable to remove leftover "()" string with get-childItem in windows powershell

I restored a large number of files in diverse folders from a hard drive, and they all included a string. I removed this string in windows powershell using get-childItem -recurse | Where {$_.name -like ...
jringger's user avatar

15 30 50 per page
1
2 3 4 5
12332