how to check if a char index contains a newline character in c code example
Example 1: javascript delete first character in string
var oldStr ="Hello";
var newStr = oldStr.substring(1); //remove first character "ello"
Example 2: javascript contains substring
var str = "We got a poop cleanup on isle 4.";
if(str.indexOf("poop") !== -1){
alert("Not again");
}
//use indexOf (it returns position of substring or -1 if not found)