I have a file name
file_name
= Screen Shot 2015-06-16 at 8.26.45 AM.png
var file_path = this.value;
var file_path_array = file_path.split("\\");
var file_name = file_path_array[file_path_array.length - 1 ];
if (file_name.length > 10){
file_name = ???
}
$('#file_name-cv').text(file_name);
Before I split them back out to screen, I want to check to see if the length is greater than 10,
if it is, keep the first 6 letters, the rest show them as 3 dots (...)
Example
Screen Shot 2015-06-16 at 8.26.45 AM.png
--> Screen...png
Can someone please give me some hints to achieve this ?