1var str = "Hello world That is reallly neat!";
2var res = str.substring(0, 5);//get first 5 chars
1const str = 'Mozilla';
2
3console.log(str.substring(1, 3));
4// expected output: "oz"
5
6console.log(str.substring(2));
7// expected output: "zilla"
1# Python3 program to Remove repeated
2# unordered sublists from list
3
4def Remove(lst):
5 return ([list(i) for i in {*[tuple(sorted(i)) for i in lst]}])
6
7# Driver code
8lst = [[1], [1, 2], [3, 4, 5], [2, 1]]
9print(Remove(lst))
10
1/*Delimiter variables, first and second position*/
2DECLARE @dfp AS CHAR(1);
3DECLARE @dsp AS CHAR(1);
4DECLARE @text VARCHAR(MAX);
5
6SET @dfp = ';';
7SET @dsp = '@';
8SET @text = 'I want you to ;Extract this@ substring for me please.';
9
10SELECT SUBSTRING(@text, (CHARINDEX(@dfp, @text) + 1), (CHARINDEX(@dsp, @text) - 2) - CHARINDEX(@dfp, @text) + Len(@dsp))
11
1var str = "The MEAN stack is MongoDB, Express.js, AngularJS, and Node.js";
2str.indexOf('MongoDB') !== -1 // true
3str.indexOf('Java') !== -1 //false
4str.indexOf('Node', 5) !== -1 //true
5