Category "string"

Is there a C function to convert a string with a number in base X to a string in base Y?

I am aware that strtol(hexstring, NULL, 16) will convert my string hexstring, which is hexadecimal, to a decimal. Likewise this would be the case in binary in s

How to make str.splitlines method not to split line by hex characters?

I'm trying to parse output from GNU Strings utility with str.splitlines() Here is the raw output from GNU Strings: 279304 9k=pN\n 279340 9k=PN\n 279376 9k<

python string split by separator all possible permutations

This might be heavily related to similar questions as Python 3.3: Split string and create all combinations , but I can't infer a pythonic solution out of this.

Truncate long strings inside json in python

Given some json [ { "default_value": "True", "feature_name": "feature_1", "active_on": "remote_1,remote_2,remote_3,remote_4,remote_5

regex to remove number (year only) from string

I know the regex that separates two words as following: input: 'WonderWorld' output: 'Wonder World' "WonderWorld".replace(/([A-Z])/g, ' $1'); Now I am l

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