Category "string"

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)

Postscript: how to convert a integer to string?

In postscript , the cvs *operator* is said to convert a number to a string. How should I use it ? I tried : 100 100 moveto 3.14159 cvs show or 100 100 movet

What is a Python bytestring?

What's a Python bytestring? All I can find are topics on how to encode to bytestring or decode to ASCII or UTF-8. I'm trying to understand how it works under th

Convert string into binary in Hive

I want to match user ids from two tables in Hive. Unfortunately they are stored in different formats. In one table they are binary whereas in the second table t

Nodejs: convert string to buffer

I'm trying to write a string to a socket (socket is called "response"). Here is the code I have sofar (I'm trying to implement a byte caching proxy...): var ht

String plus Char - what is happening?

I'm just curious about what is going on when trying to add a char to a string. Initially, I thought it would work like a concatenation but it didn't: cout<&l

c++11/regex - search for exact string, escape [duplicate]

Say you have a string which is provided by the user. It can contain any kind of character. Examples are: std::string s1{"hello world"); std::

How to insert a new line in strings in Android

I'm creating an android application and within it there is a button that will send some information in an email, and I don't want to have everything all in one

Replace multiple whitespaces with single whitespace in JavaScript string

I have strings with extra whitespace characters. Each time there's more than one whitespace, I'd like it be only one. How can I do this using JavaScript?

check if string exists in a file

I have the following piece of code which opens a text file and reads all the lines in the file and storing it into a string array. Which then checks if the st

std::regex escape special characters for use in regex

I'm string to create a std::regex(__FILE__) as part of a unit test which checks some exception output that prints the file name. On Windows it fails with:

How to order strings case-insensitively (not lexicographically)?

I'm attempting to order a list input from a file alphabetically (not lexicographically). So, if the list were: C d A b I need it to become: A b C d Not the