Supprimer le premier caractère javascript
let str = 'Hello';
str = str.slice(1);
console.log(str);
/*
Output: ello
*/
Important Ibex
let str = 'Hello';
str = str.slice(1);
console.log(str);
/*
Output: ello
*/
String string = "Hello World";
//Remove first character
string.substring(1); //ello World
//Remove last character
string.substring(0, string.length()-1); //Hello Worl
//Remove first and last character
string.substring(1, string.length()-1); //ello Worl
let str = 'Hello';
str = str.substring(1);
console.log(str);
/*
Output: ello
*/
String str = "Hello World";
String str2 = str.substring(1,str.length());
"Hello World".substring(1) // ello World
<?php
$str = "geeks";
// Or we can write ltrim($str, $str[0]);
$str = ltrim($str, 'g');
echo $str;
?>