Category "string"

How to merge multiple strings and int into a single string

I am a newbie in Go. I can't find any official docs showing how to merge multiple strings into a new string. What I'm expecting: Input: "key:", "value", "

How can I split up a long f-string in Python?

I am getting a line too long PEP 8 E501 issue. f'Leave Request created successfully. Approvers sent the request for approval: {leave_approver_list}' I tried us

Converting char * to Uppercase in C

I'm trying to convert a char * to uppercase in c, but the function toupper() doesn't work here. I'm trying to get the name of the the value of temp, the name be

Libwesockets.h: Issue with lws_write: C++ string to C conversion and send

I'm using g++. Code: std::string str = "{\"action\":3,\"data\":{\"account\":\"somehashgoeshear\",\"someint\":0,\"id\":1,\"moreint\":0,\"name\":\"demo\

Resource String Color not working programmatically in Android

string.xml Here is my string <string name="bullet_text"><font color="#38d98a">●</font>\t\tCucumber Detox Water (1 glass)\n<font color

From snake_case to camelCase in Java

Can anyone tell me how to convert a string in snake_case as: camel_case to a string in camelCase as: camelCase in Java? Thank you in advance.

Find index of numbers from a string in Javascript

I would like to get the index of numbers ( 1994 and 27 ) in the string bellow i tried to split the string but no idea what to do after that let str = 'year o

How to convert String into Hex nodejs

I was looking for some standard function like hex to string but inverse, I want to convert String to Hex, but I only found this function... // Example of conve

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

I need to convert input data to lower and then return it in it's original form with PHP, is it impossible or does anyone have a solution? thank you. ps, i'm

F String With Special Characters

I want to print the following using an f string literal. It will be running wihtin a function and apples will be one of the arguments. I want it to have the squ

Regular Expression to search longest word in a string

I have a string: var str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit"; Is there a way to find the longest word in a string using regex? This w

Convert a mat-datepicker into a String

I'm trying to have a reactive form in which there is some dates that are entered by the user using mat-datepicker. The problem I face is that the output of the

String iterator in swift

I try to create an iterator for string processing in swift that will return every time the next chracter. But with no luck. (The final goal is to write a parser

Leetcode word ladder : How is this solution most efficient?

I'm doing this question in Leetcode : https://leetcode.com/problems/word-ladder/ My solution was a BFA approach, and only one nested loop: def ladderLength(self

Unicode to Arabic Win1256

I have Unicodes in my Database which were encoded from Arabic and I need some source code to convert it to actual Arabic. I have tried a lot of codes but not wo

Check if a permutation of a string can become a palindrome

Write a method to test if a string meets the preconditions to become a palindrome. Eg: Input | Output mmo | True yakak | True travel |

Valid Braces - CodeWars Challenge

There is a challenge on codewars that asks you to check whether a string of parentheses, brackets, and curly braces is valid. A string of braces is consider

Valid Braces - CodeWars Challenge

There is a challenge on codewars that asks you to check whether a string of parentheses, brackets, and curly braces is valid. A string of braces is consider

Sending string using i2c commuication on two arduino micro-controller

i am using two arduino mcu to connect two lines of LED-matrix display. I tried using i2c communication to connect a master mcu (which controls the first line of

pandas dataframe replace blanks with NaN

I have a dataframe with empty cells and would like to replace these empty cells with NaN. A solution previously proposed at this forum works, but only if the ce