Category "string"

Is there any good reason for columns to be characters instead of factors?

This may seem like a silly question, but after working with R for a couple of months, I realised I often find myself converting strings to factors as, for examp

I know of f-strings, but what are r-strings? Are there others?

I started learning python for the first time in an accelerated course on data science a few weeks ago and we were introduced early on to f-strings. The simple

How to convert hex string to byte array in Java

I want to convert an hex string to byte array, I know these type of questions are already asked, I have tried their solution, But these solutions are not workin

C text formatter characters count is off

So I have an assignment to format text according to rules and eventually print out the number of characters in the string (including \n and spaces, anything but

PL SQL String Manipulation (Deconcatenate based on multiple delimiters)

I have string such as A~B~C,D~E,F~G~H,I. The string is comma separated and then each comma separated substring is ~ separated. There is no limit on the number o

How to declare string array[] of unknown size (JAVA)

I want my String[] array; to be static but I still don't know it's size. Is there any way to declare string array of unknown size? As much as possible I don't

Difference between String trim() and strip() methods in Java 11

Among other changes, JDK 11 introduces 6 new methods for java.lang.String class: repeat(int) - Repeats the String as many times as provided by the int paramete

How do I make my Android app prefix each displayed line of text with ">"?

My app displays a long line of text like this: I want to add a ">" character to each line, so I tried the following code: private String addPrefixChars(Stri

Which one is better for string reverse in Python 3?

s="google" print("".join(reversed(s))) //elgoog print(s[::-1]) //elgoog In above the string is reverse using python 3 reversed method and slicing method bot

How to parse a string to array in js

I have an a string like the following, var x = "[{"k":"1"}]"; console.log(x[0].K); I ant hange this string sine I am getting from the server.Its out of my co

check that a word is an isogram with pure javascript

How do i check that a given word is an isogram with pure javascript, using a function. the function must return true or false. An isogram is a word with a repe

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.