indexof Questions
2
I'm trying to get the starting position for a regexmatch in a folder name.
dir c:\test | where {$_.fullname.psiscontainer} | foreach {
$indexx = $_.fullname.Indexofany("[Ss]+[0-9]+[0-9]+[Ee]+[...
Typesetter asked 4/2, 2016 at 22:51
2
Solved
I have an array of JSON objects and I want to find the object with a certain property. I know this may look like a duplicate question, but please continue because I think it's slightly different th...
Catabasis asked 17/12, 2015 at 13:54
1
Solved
string s = "Gewerbegebiet Waldstraße"; //other possible input "Waldstrasse"
int iFoundStart = s.IndexOf("strasse", StringComparison.CurrentCulture);
if (iFoundStart > -1)
s = s.Remove(iFoundSt...
Insolvency asked 5/11, 2015 at 18:15
1
Solved
In Swift 2, I'm receiving an error:
Cannot convert value of type '[String:AnyObject]' to expected argument type '@noescape ([String:AnyObject])' throws -> Bool"
//today = NSDate()
//array : [...
2
Here is the code:
@IBAction func deleteMeme(sender: UIBarButtonItem) {
if let foundIndex = MemeRepository.sharedInstance.memes.indexOf(selectedMeme) {
//remove the item at the found index
Mem...
1
Solved
I am curious whether there exists a difference in efficiency for the indexOf method that is available for both Array and String in JavaScript. I thought the indexOf is less efficient on String than...
Nicholasnichole asked 10/10, 2015 at 3:3
1
Solved
Is there a way to search a string for the index of the start of a substring?
Like, "hello".indexOf("el") would return 1. Thanks
2
Solved
I have a datagrid having few columns-
The header of the grid is hyperlink and I am setting its value at runtime as follows-
string strQ1 = "<a href='somePage.aspx?ID=1'>gfgytyty<a>";
...
3
var longString = "this string is long but why"
var shortString = "but why"
How can i test if shortString is the not only contained in longString but it is actually the last part of the string.
I...
Miasma asked 7/5, 2015 at 18:15
3
Solved
While find(["a", "b"], "c") works with no problems, I get an error when trying to find the index of a structure inside an array of structures:
struct Score
{
//...
}
var scores: [Score] = //...
...
2
Solved
I have a simple question. How do I make indexof case insensitive in java. This question has been already answered in some forum but I didn't understand the answer.
Say for eg.I have a string s = P...
1
Solved
How to obtain the index of one Instance in a List?
class Points {
int x, y;
Point(this.x, this.y);
}
void main() {
var pts = new List();
int Lx;
int Ly;
Points pt = new Points(25,55); //...
2
Solved
My problem is that String.IndexOf returns -1. I would expect it to return 0.
The parameters:
text = C:\\Users\\User\\Desktop\\Sync\\̼ (note the Combining Seagull Below character)
stringToTrim = ...
5
Solved
Here is the code:
var collection = [new Date(2014, 11, 25), new Date(2014, 11, 24)];
var d=new Date(2014, 11, 24);
var idx= collection.indexOf(d);
I guess the variable idx should have a value o...
Tashinatashkent asked 12/12, 2014 at 19:36
8
Solved
I need the index of the first value in the array, that matches a custom compare function.
The very nice underscorej has a "find" function that returns the first value where a function returns true...
Cassiodorus asked 10/9, 2012 at 17:28
3
Solved
I want to write really nice looking idiomatic Scala code list indexOf foo getOrElse Int.MaxValue but now I have to settle for idiotic Java looking code val result = list indexOf foo; if (result <...
Pyonephritis asked 22/8, 2014 at 21:32
3
I need to implement stringUtils Class indexOf() method in postgresql.
Lets say I have a table in which url is one of the column.
url : "http://paypal-info.com/home.webapps.cgi-bin-limit/webscr....
Siena asked 22/8, 2014 at 8:16
4
The following code does not give me right answer.
class Point {
int x; int y;
public Point(int a,int b){
this.x=a;this.y=b;
}
}
class A{
public static void main(String[] args){
ArrayList...
4
This function executes during the forms onSubmit, and works fine in Firefox and Chrome, but not in IE. I suspect it's indexOf, but I cannot seem to find a way to get it to work.
function checkSubu...
Swirly asked 13/9, 2010 at 2:26
2
Solved
Is there a Scala library API method (and if not, an idiomatic way) to obtain a list of all the indexes for a substring (target) within a larger string (source)? I have tried to look through the Sca...
1
Solved
I currently have this code to check the website URL GET options for a specific ID, but whenever this code is run, I get a weird error: Uncaught TypeError: Undefined is not a function
Here is my co...
Examinant asked 28/6, 2014 at 21:41
3
Solved
Edit: This question is out of date as the Polyfill example has been updated. I'm leaving the question here just for reference. Read the correct answer for useful information on bitwise shift operat...
Gesticulate asked 11/3, 2014 at 20:24
1
Solved
The IndexOf function called on a string returns -1, while there definitely is a match.
string sUpperName = "PROGRAMOZÁSI NYELVEK II. ADA EA+GY. (BSC 08 A)";
string sUpperSearchValue = "N";
sUpper...
1
Solved
In VS2012's C# the following code:
string test = "[ " + (char)0xFFFD + " ]";
System.Console.WriteLine("{0}", test.IndexOf(" ") == 1);
results in a
True
printed to console output window. The ...
5
Solved
Hello I am using indexOf method to search if a string is present inside another string. But I want to get all the locations of where string is? Is there any method to get all the locations where th...
Honky asked 29/7, 2010 at 18:40
© 2022 - 2024 — McMap. All rights reserved.