Category "string"

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

Why does this function that removes the first occurrence of a string from another string not work correctly?

I tried to write a function that removes the first occurrence of a string from another string: def removesubstr(substr, x): a = len(substr) m = "" c

Sorting an array of strings in C++

I am trying to accomplish the following task: List the students in alphabetic order, sorted by last name. Do not change the given case of the names. Do not ch

Which is the best way to append single quotes for a String in java

For example, String x= "ABC"; Which is the best way to convert ABC to 'ABC' ?

convert string to hex in lua?

I am going to send a byte array through socket.But I used to work in c/c++ and be new to lua. Now i have a problem,here is my question. i want to send a bytear

Why does this selectizeInput minimum values function not work correctly for 2 digit numbers even though it works fine for single digit numbers?

This one has me puzzled. The below code extract uses selectizeInput() to allow the user to choose to/from periods for purposes of data analysis (latter not show

How to shuffle strings in arrays in golang?

So I created a program to help me decide which game to play. Before I start my problem let me show you my code: package main import ( "fmt" "strconv"

Using Python to find drive letter (Windows)

I'm trying to write a python script (I'm a newbie) that will search the root directory of each connected drive on Windows for a key file and then return the dri

Why are some characters ignored when calling LastIndexOf?

Please take a look at these codes : string str_to_find = "➖➖➖➖➖➖➖➖➖➖\r\n"; string str

[]byte(string) vs []byte(*string)

I'm curious as why Go doesn't provide a []byte(*string) method. From a performance perspective, wouldn't []byte(string) make a copy of the input argument and ad

Remove trailing substring from String in Java

I am looking to remove parts of a string if it ends in a certain string. An example would be to take this string: "[email protected]" And remove the @2x.p

Is there a way to match patterns from one column to other one?

I want to use club position and check if preferred_position contain the string then return True/False value for each row. Club_position Preferred_position RM R

Creating a powershell function that will take on ONE parameter and outputs a concatenated string value (fname+lname)

I'm looking for some guidance or tips for how to revise the function below. My goal is create a function that accepts one parameter and then returns a string. I

iOS: Recieveing a crash NSInvalidArgumentException NSConcreteMutableAttributedString addAttribute:value:range:: nil value

This is the line that the error is occurring on. [self addAttribute:(__bridge NSString*)kCTForegroundColorAttributeName value:(__bridge id)color.CGColor range

Rewriting strlen() in C [closed]

if anyone has ever wanted to try and rewrite a string function in C, would this code work to replace the standard strlen() function? I have no

Need to check that braces in given array are balanced or not

Braces in a string are considered to be balanced if they met the following conditions, All braces must be closed. braces come in a pair of the form of (), {},

Java: Print a unique character in a string

I'm writing a program that will print the unique character in a string (entered through a scanner). I've created a method that tries to accomplish this but I ke

Why is my code for Codingbat String-2 EndOther not working?

I won't lie, this is sort of homework for my AP Computer Science class. But I talked to my teacher, and he couldn't figure it out either. So I'm doing the Java

Read and write a String from text file

I need to read and write data to/from a text file, but I haven't been able to figure out how. I found this sample code in the Swift's iBook, but I still don't