1 2 3 4 5 |
var str = "Abc: Lorem ipsum sit amet"; str = str.substring(str.indexOf(":") + 1); |
Shows “Lorem ipsum sit amet”
And before the colon, which will give “Abc”
1 2 3 |
str.substring(0, str.indexOf(":")); |
1 2 3 4 5 |
var str = "Abc: Lorem ipsum sit amet"; str = str.substring(str.indexOf(":") + 1); |
Shows “Lorem ipsum sit amet”
And before the colon, which will give “Abc”
1 2 3 |
str.substring(0, str.indexOf(":")); |
© 2022 CODEHAVEN