Category "string"

Removing leading zeros from a string in SQL Server 2008 R2

I have a string representing a batch number of goods, for example "0000AZA001B". I only need the "AZA001B" part. How can I achieve that in SQL Compact?

How to replace " into space or delete first and last symbol?

I get xml data and I get value from it. I need to delete symbols [ and ] Here is my code, that gives me error about undegined variable: @xml = XmlSim

Printing hex from dx with nasm

I actually want to print the content of the dx register with nasm. Thereby the content is a 16 bit hex digit such as 0x12AB. Therefore I've first implemented a

Printing hex from dx with nasm

I actually want to print the content of the dx register with nasm. Thereby the content is a 16 bit hex digit such as 0x12AB. Therefore I've first implemented a

How to replace first occurrence of string in Java

I want to replace first occurrence of String in the following. String test = "see Comments, this is for some test, help us" **If test contains the input as

Windows Batch: Split String to individual characters to variables

in Windows Batch, if I had a variable (length can change) that was, for example: "hello world!" is it possible to "split" the variable so each character is its

How to remove text from a string?

I've got a data-123 string. How can I remove data- from the string while leaving the 123?

mustache.js date formatting

I have started using mustache.js and so far I am very impressed. Although two things puzzle me. The first leads on to the second so bear with me. My JSON {"g

How can I extract a number from a string in JavaScript?

I have a string in JavaScript (e.g #box2) and I just want the 2 from it. I tried: var thestring = $(this).attr('href'); var thenum = thestring.replace( /(^.+)(\

Swift - Remove " character from string

I have a string which is "Optional("5")". I need to remove the "" surrounding the 5. I have removed the 'Optional' by doing: text2 = text2.stringByReplacingO

Need to make a list by splitting the given string in python

Input string has 'n' times of X. Like this "XXXXX" Need to split the string and make out a list in which each character of the string(X) is each element of list

Using Windows Batch Files to split large "Wrapped" files

I need a method to split files into multiple (or even half) based on KB not on number of lines. I am a Senior EDI Analyst and wrapped data tends to show up as

Remove portion of string in Javascript

I have a String like this in Javascript: string = '@usernameWhats on your mind?' I need to get rid of 'Whats on your mind?' from the string. How would I do

Passing JSON into R function

I am trying to pass the following JSON into a function in R. The raw JSON { "type": "Polygon", "coordinates": [ [ [-122.68,42.77], [-1

python map string split list

I am trying to map the str.split function to an array of string. namely, I would like to split all the strings in a string array that follow the same format. An

isalnum() in python is testing for True for all strings from a list

Here is a simple code block. I'd like to test each element in the list to see if it contains an Alpha Numeric character for further processing. #!/usr/bin/pyth

MySQL equivalent of Python's triple-quoted strings?

Using Python's triple-quoted strings I can define strings containing ', backticks, or " without having to care about it: hello = """ This strin

Algorithm to find edit distance to all substrings

Given 2 strings s and t. I need to find for each substring in s edit distance(Levenshtein distance) to t. Actually I need to know for each i position in s what

Laravel str_random() or custom function?

Is the Laravel str_random() function random enough so that I can use it for IDs? For example: str_random(32); This produces a random string of length 32 mad

Convert float to String and String to float in Java

How could I convert from float to string or string to float? In my case I need to make the assertion between 2 values string (value that I have got from table)