Answers for "what does substring do"

13

substring

const str = 'Mozilla';

console.log(str.substring(1, 3));
// expected output: "oz"

console.log(str.substring(2));
// expected output: "zilla"
Posted by: Guest on February-06-2020
1

substring

# Python3 program to Remove repeated 
# unordered sublists from list
  
def Remove(lst):
     return ([list(i) for i in {*[tuple(sorted(i)) for i in lst]}])  
       
# Driver code
lst = [[1], [1, 2], [3, 4, 5], [2, 1]]
print(Remove(lst))
Posted by: Guest on May-27-2021
0

Substring

/*Delimiter variables, first and second position*/
DECLARE @dfp AS CHAR(1);
DECLARE @dsp AS CHAR(1);
DECLARE @text VARCHAR(MAX);

SET @dfp = ';';
SET @dsp = '@';
SET @text = 'I want you to ;Extract this@ substring for me please.';

SELECT SUBSTRING(@text, (CHARINDEX(@dfp, @text) + 1), (CHARINDEX(@dsp, @text) - 2) - CHARINDEX(@dfp, @text) + Len(@dsp))
Posted by: Guest on August-16-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language