Category "string"

UTF-8 encoding java replacement with 3 hex character

My application is receiving data from an endpoint. I do some processing with the received data and insert it into the database. At some point I had a problem wi

anything wrong with this trim() method in C

this method is for trimming a string in C by deleting spaces from the beginning and end. BTW iam not that good with C and actually facing some issues with deald

Split a text using different delimiters

long time no coding in c and i'm a bit in trouble. I get tex from a file formatted like that: # 3 10 P1 16 3 P2 8 1 P3 10 2 from the second line every line re

split strings that contain more than one substring

I have a list of strings names names = ['Acquaintance Muller', 'Vice president Johnson Affiliate Peterson Acquaintance Dr. Rose'] I want to split the strings th

MarkLogic matches function with regular expression

I am new to XQuery so could you please help me to understand what is § and §.*$ in below MarkLogic XQuery: if (matches($cite, '§'))

How to enter string value into Delta PLC?

I would like to insert string value into PLC, I searched a lot of information but unable to get an accurate method to do it. The plc that I using is DVP-14SS2 a

Array and string in ruby

Hi amazing stackers! date = "10/02/2021" d1 = date.split("/") d2 = d1.to_s puts d1 puts d1.class puts d2 puts d2.class in the above code, d2 shows the data typ

String Split function in MySQL

can anybody tell me how to implement a split function in mysql which behaves like Javascript split. I want a function like this SELECT Split('a,b,c,d', ',') A

Syntax error when parsing variable from XML within an SQL stored Procedure

So, I'm trying to run a stored procedure within another stored procedure and parse out some XML data into a variable. It is giving me a syntax error on the fir

Convert a short DateTime string with date and time to DateTime

Having trouble with my Android project here trying to convert a string of DateTime into an actual DateTime object. here's the code I wrote: string strDateTime =

Python how to add create blocks from multiline text

I have the textblock below and I am trying to separate into 3 blocks with regex. When you see the name field it would start a new block. How can I return all

How to print strings and integers in the same line?

I'm trying to print each item in the following two lists: lNames = ['John','David','Michael'] lAges = [45,14,32] with the format: "Person 0, Name: John, Age 3

Program to find if a string is a palindrome keeps on failing. Even after using toLowerCase() command for both strings, output doesn't come

import java.util.Scanner; class Palindrome_string { public static void main() { System.out.println("\f"); Scanner sc = new Scanner(Syste

Convert into DateTime format ISO8601

I am receiving the input date as below. 2022-05-05 18:08:13.311951 +0:00 And I am trying to convert this to below format which follows ISO8601 format. 2022-05-

How to check if values in first dataframe are contained or match values in another dataframe

I am using R to work with some dataframes. My issue is related on how to check if values in a variable in a first dataframe match with values in another datafra

I need to modify (the lower case method ) to support the letter Arabic language

How can I modify or replace the .lower method of strings to support Arabic text? for example, there's a difference between "سارة" and "&

RegExp Match all text parts except given words

I have a text and I need to match all text parts except given words with regexp For example if text is ' Something went wrong and I could not do any

Duplicate Encoder JavaScript, try to use indexOf but the output is still incorect

convert a string to a new string where each character in the new string is "(" if that character appears only once in the original string, or ")" if that charac

How do I create a Java string from the contents of a file?

I've been using the idiom below for some time now. And it seems to be the most wide-spread, at least on the sites I've visited. Is there a better/different way

When using the substr() string function, Why is a litteral carriage return twice as long as a line feed character "\n"?

When typing the following code ... (easily testable with W3schools' editor) <?php $basecss = '.class { margin-bottom:0 } /*1234567890'; $basemincss = ".