Category "string"

C# Combined length of user strings used by the program exceeds allowed limit. Try to decrease use of string literals

When I add a static string property to my class that returns a long string I get this error. In the same project I have added lots of string properties over 20

XSS - Javascript String

Is it possible to perform an XSS on the following: <script> var name = "USER_INPUT";</script> where USER_INPUT is given by the user. I have a fil

swift - Remove white spaces from var(UITextField input) doesn't work

I'm new to swift, but from ObjectiveC background, I tried to get an input from textfield into a var, on a button click. Now, when I tried to remove blank space

Any difference between str.capitalize() and str.title()?

Is there any difference in str.title() vs str.capitalize()? My understanding from the docs is that both methods capitalize the first letter of a word and make t

Serving HTML as C array from Arduino code - String size limit problem

I've been working on a HTML / websocket server on a Wiznet W5100S-EVB-Pico, programmed in the Arduino IDE. It all worked fine up until now but I'm running into,

plotting data from a list in python

I need to plot the velocities of some objects(cars). Each velocity are being calculated through a routine and written in a file, roughly through this ( I have

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