Category "string"

Why is conversion from string constant to 'char*' valid in C but invalid in C++

The C++11 Standard (ISO/IEC 14882:2011) says in § C.1.1: char* p = "abc"; // valid in C, invalid in C++ For the C++ it's OK as a pointer to a String Lit

Python/Pandas Add string to rows in a column that contain a character a specific number of times

I have a Pandas DataFrame(data) with a ['Duration'] column as 'object' type that has time durations in format: 'H:%M:%S' such as '1:47:54' with 7 characters, bu

How can you verify a multiple code point emoji is supported?

For context, I'm trying to create a mapping from string code points to emojis and need to know if the system supports the emoji: ("1F9AE") -> "🦮" ("1

Regex to match Number of 1-3 Digits After a Known String in Ruby

I need to match the numbers in the following strings. It is possible they may be part of longer strings with other numbers in them, so I specifically want to ma

Challenge: Short-Circuiting a Loop - Interview Practice

Question: Complete the function holidays that accepts an array of strings and iterates through the array. If the array contains the string "October", return "Ha

source to source transformation

I would like to transform input.js to output.js using string manipulation in python here is input.js let k=document.createElement("div"); k.innerHTML='<style

How to check if a string passed as argument is a modifiable string

The question is pretty much in the title. The code void modify_str(char* str){ if(strlen(str) > 5) { str[5] = 'x'; } } Will invoke undef

Checking a string value to return a range from another worksheet then add to .To line in email

I am trying to get email addresses from a worksheet(Sheet1) into the .To line for an outlook email based on the specific string value in the main worksheet. I h

Get value from sequence Freemarker

I've got a call that gives a result in the body that looks like this: body=[{"id":"be6ea215-1a69-44bb-8269-4f80867c69d7","name":"BlaBla1","externalLinks":[]},{"

If there is a difference between two constructs

If there is a difference between two constructs I would like to know std::string name = std::string("Eugene"); and std::string name = "Eugene";

Truncate string with html tag in Laravel

I want to truncate in Laravel text from database with HTML Tag, for example: <p>Hi. I want to say about my story. </p> I found a method: {{ Str::li

Failing to remove all $ in strings in a dataframe

I'm trying to remove unnecessary values in the strings in my dataframe so I can make them integers and do some math logic on them. The commas, and upward arrows

UTF-8 encoding java replacement with 3 hex character

My application is receiving data from an endpoint. I do some processing with the received data and insert it into the database. At some point I had a problem wi

anything wrong with this trim() method in C

this method is for trimming a string in C by deleting spaces from the beginning and end. BTW iam not that good with C and actually facing some issues with deald

Split a text using different delimiters

long time no coding in c and i'm a bit in trouble. I get tex from a file formatted like that: # 3 10 P1 16 3 P2 8 1 P3 10 2 from the second line every line re

split strings that contain more than one substring

I have a list of strings names names = ['Acquaintance Muller', 'Vice president Johnson Affiliate Peterson Acquaintance Dr. Rose'] I want to split the strings th

MarkLogic matches function with regular expression

I am new to XQuery so could you please help me to understand what is &#xA7; and &#xA7;.*$ in below MarkLogic XQuery: if (matches($cite, '&#xA7;'))

How to enter string value into Delta PLC?

I would like to insert string value into PLC, I searched a lot of information but unable to get an accurate method to do it. The plc that I using is DVP-14SS2 a

Array and string in ruby

Hi amazing stackers! date = "10/02/2021" d1 = date.split("/") d2 = d1.to_s puts d1 puts d1.class puts d2 puts d2.class in the above code, d2 shows the data typ

String Split function in MySQL

can anybody tell me how to implement a split function in mysql which behaves like Javascript split. I want a function like this SELECT Split('a,b,c,d', ',') A