Manage PlItems

You may optionally enter a comparison operator (<, <=, >, >=, <> or =) at the beginning of each of your search values to specify how the comparison should be done.

Advanced Search
Displaying 131-140 of 300 results.
IDPlCodelangPlGroupPlItemTitleCode 
 
185T-SQLStringsPrüfen ob eine Zahl in einem String enthalten istSELECT value ,CASE WHEN PATINDEX('%[0-9]%',value) > 0 THEN 1 ELSE 0 END AS CheckIfStringContainsANumber FROM ( SELECT 'String w/o a number' AS value UNION ALL SELECT 'This string contains 1 as a number' AS value ) subQuery1 -- value | CheckIfStringContainsANumber -- ------------------------------------------------------------------ -- String w/o a number | 0 -- This string contains 1 as a number | 1View Update Delete
186PythonStringsString nach Delimenter zerlegenmyString = "A;B;C;D;E" myPieces = myString.split(";") # erzeugt ein Arrey mit den einzelnen Zeichen print myPieces[2] # gibt C ausView Update Delete
199JavaScriptStringsString auf Wunschlänge zuschneidenmyString = "abc"; mySubString = myString.substring(0,2); // abView Update Delete
201ExcelStringsReplace/* Cell A1 contains text "abc#def" */ =SUBSTITUTE(A1;"*";"/") /* Result will be: "abc/def" */View Update Delete
215PythonStringsReplace# http://www.tutorialspoint.com/python/string_replace.htm str1 = "abc#def" str1 = str1.replace("#",';") print str1 # Output: abc;defView Update Delete
220T-SQLStringsPosition eines Teilstrings findenDECLARE @searchFor_Charindex Varchar(10) DECLARE @searchFor_Patindex Varchar(10) DECLARE @text Varchar(100) SET @searchFor_Charindex = 'simple' SET @searchFor_Patindex = '%simple%' -- Remember the %. Patindex can also be used for RegEx! SET @text = 'this is a simple text' SELECT CHARINDEX(@searchFor_Charindex, @text) AS Position_Charindex SELECT PATINDEX(@searchFor_Patindex, @text) AS Position_Patindex -- 11View Update Delete
221DelphiStringsPosition eines Teilstrings findensearchFor:='simple'; text:='this is a simple text'; ShowMessage(IntToStr(pos(searchFor,text))); // 11View Update Delete
223SQLiteStringsStrings miteinander verbindenSELECT field_a ,field_b ,field_a || field_b as together FROM table_1View Update Delete
224PHPStringsReplace// http://php.net/manual/de/function.str-replace.php $str1 = "abc#def"; $str1 = str_replace("#",";",$str1); echo $str1; # Output: abc;defView Update Delete
228PowerShellStringsReplace$str1 = "abc#def"; $str1 = $str1.Replace("#",";"); write-host $str1; # Output: abc;defView Update Delete