Category "string"

How to convert bytes represented as a string to the real bytes

Suppose we have a string that looks like this: fake_bytes = "b'This is a check - \xe2\x9c\x94\xef\xb8\x8f'" So this fake_bytes string is a text that is encoded

Snowflake CONCAT strings with DISTINCT values

I am doing a merge where a string exists in my target table. To this I want to concat a new delta value which is a ; separated string list in my WHEN MATCHED ..

How to count the amount of substring occurences? [duplicate]

How do I count the amount of times a substring appears in a string? So far I have static boolean doesAppear(String a, String b){ boolean a

What are the practical uses for strings?

I have been following some Fortran tutorials online and have recently come across strings. I was just wondering... what are the practical uses of them? It's pro

String Pattern Matching in C

I was trying this pattern matching method in C but whenever I give all the input, the vscode terminal waits for a while and just stops the program without any w

How can I multyply spaces and repair my code in haskell?

Specify the function that appends a text to a given length by appending a sufficient amount of space to the beginning of the text! If the text is not shorter th

Add a "i" variable to a variable name C# [duplicate]

I have a cube1, cube2, cube3 etc... variables and i want to use something like that: for (int i = 1; i < 100; i++) { Location "cube + i

How do I compare strings in Java?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals()

Add string and integer from one line string generate by speech recognizer to 2 separate list

I have some string from speech recognizer and the value is random but in the same form (x,y...n) MyOrder = 'orange 2 grape 3 apple 4 mango 5 banana 1' How to a

Turning code (instead of data) into a vector

I have the following code: install.packages("microbenchmark") install.packages("readxl") install.packages("data.table") I would like to create a vector of a va

How to convert string to bytes8 in solidity?

I get string parameter in the function, and the length of the parameter is less than 8. and I want to convert this parameter to bytes8 for saving in the array.

Python - Matching close strings in two separate arrays

I have two different arrays populated with a number of string values and I would like to compare the two arrays and find the matches. The main problem is that t

regexp_matches, array per row

In PostgreSQL, I have a table as follow. | id | mycolumn | | -------- | -------------- | | 1 | /1/2/8/ | | 2 | /1/40/22/11/ |

Return the string having repetitive substrings consecutively more than x times

I’d like to get the string having repetitive substrings consecutively more than x times. The substrings has more than y characters. For example, when x=4,

How to add a comma after every three digits? [duplicate]

Add a character in between a string How can I add a comma after every three characters in a string? For example, i have a string number = "200

Randomise each element of String from inside? [duplicate]

I am trying to change the place of characters in a string. The first and last have to stay like they are. For example: String str = "String te

Remove part of a string in each row of a large column of data in KNIME

I am stumbed. I have a column with some thousand rows of unique adresses regarding universities, pharmacompanies etc. in a KNIME workflow Example: 55 Shattuck S

String allocation behaving strangely

This compiles fine (from the rust lang book): fn main() { let mut s = String::from("hello"); s.push_str(", world"); println!("{}", s); } This does

Java How to validate characters using a string?

I am working on a java project and was wondering how I could use a string to determine whether or not the chars in an array are valid. The given string is final

Merge column into one string from 2D list

I want to merge one column into one string from 2D list. Are there better ways to merge it? lists = [['H', 'W'], ['e', 'o'], ['l', 'r'], ['l', 'l'], ['o','d']]