Top "Substring" questions

Part of a string, or the function/method that returns part of a string

javascript substring

the most darndest thing! the following code prints out 'llo' instead of the expected 'wo'. i get such surprising results …

javascript string substring
How to remove time-field string from a date-as-character variable?

Suppose I have a variable like this c<-c("9/21/2011 0:00:00", "9/25/2011 0:00:00", "10/2/2011 0:00:00", "9/28/2011 0:00:00", "9/27/2011 0:00:00") what's a quick way to remove all 0:00:00s so that …

string r substring date-formatting
how to substitute part of a string in python?

How to replace a set of characters inside another string in Python? Here is what I'm trying to do: let's …

python string substitution substring
use length function in substring in spark

I am trying to use the length function inside a substring function in a DataFrame but it gives error val …

scala apache-spark dataframe substring string-length
How can I get a substring from position N to the last char in Ruby 1.8.7?

I'd like to get a substring from a string from position N to the end of the string. What's the …

ruby string substring
Check if variable starts with 'http'

I'm sure this is a simple solution, just haven't found exactly what I needed. Using php, i have a variable $…

php substring string-comparison
Swift Get string between 2 strings in a string

I am getting a string from html parse that is; string = "javascript:getInfo(1,'Info/99/something', 'City Hall',1, 99);" my code is …

ios string swift substring
Checking if a string contains a particular substring in Velocity

In Velocity I have a variable called $url which contains the following string: [ContentId(2.7507), ContentId(2.7508), ContentId(1.44551)] I want to check …

java string substring velocity
How to get substring with specific ranges in Swift 4?

This is using the example code from the official Swift4 doc let greeting = "Hi there! It's nice to meet you! 👋" …

swift substring swift4
Ruby idiom for substring from index until end of string

Just wondering if there's a Ruby idiom for extracting a substring from an index until the end of the string. …

ruby string substring slice idioms