Answers for "return substring"

PHP
1

php limit string length

if (strlen($str) > 10)
   $str = substr($str, 0, 7) . '...';
Posted by: Guest on July-17-2020
31

substring javascript

var str = "Hello world!";
var res = str.substring(1, 4); //ell
Posted by: Guest on December-25-2019

Browse Popular Code Answers by Language