Top "Startswith" questions

Relates to the task of finding a subset of data at the beginning of a set of data.

How to check if a string "StartsWith" another string?

How would I write the equivalent of C#'s String.StartsWith in JavaScript? var haystack = 'hello world'; var needle = 'he'; …

javascript string startswith
How do I check if a C++ std::string starts with a certain string, and convert a substring to an int?

How do I implement the following (Python pseudocode) in C++? if argv[1].startswith('--foo='): foo_value = int(argv[1][len(…

c++ string parsing substring startswith
If strings starts with in PowerShell

Is there a way to check if a string starts with a string? We are checking the groupmembership from the …

powershell if-statement startswith
Regex to check with starts with http://, https:// or ftp://

I am framing a regex to check if a word starts with http:// or https:// or ftp://, my code is …

java regex startswith
Code not running in IE 11, works fine in Chrome

The following code can be run without a problem in Chrome, but throws the following error in Internet Explorer 11. Object …

javascript html startswith
How do I find if a string starts with another string in Ruby?

What the best way to find if a string starts with another in Ruby (without rails)?

ruby string startswith
What is the easiest way to get all strings that do not start with a character?

I am trying to parse about 20 million lines from a text file and am looking for a way to do …

python string startswith
How to check if a string starts with another string in C?

Is there something like startsWith(str_a, str_b) in the standard C library? It should take pointers to two …

c string comparison startswith
Does R have function startswith or endswith like python?

> startsWith('abc', 'a') [1] TRUE > startsWith('abc', 'c') [1] FALSE > endsWith('abc', 'a') [1] FALSE > endsWith('abc', 'c') [1] TRUE

python r string startswith ends-with
How do I ignore case when using startsWith and endsWith in Java?

Here's my code: public static void rightSel(Scanner scanner,char t) { /*if (!stopping)*/System.out.print(": "); if (scanner.hasNextLine()) { String …

java string case-insensitive startswith ends-with