asp.net mvc 3 - Get file name from path -


how can split path file name 1_lighthouse_20140306143834816.jpg? , split 1_lighthouse_20140306143834816.jpg 1 reference number 1 exist.

get file name

use path.getfilename

if(countuser.length > 0) {     var file = path.getfilename(countuser[0]);     .... 

and first character resulting string using string indexer

   char firstchar = file[0];    if(firstchar == '1')       .....  } 

Comments

Popular posts from this blog

python - matpltolib navigation toolbar edit curves and parameters line color automatically changes issue -

node.js - Nodejs javascript implementation of PBEWithMD5AndTripleDES/CBC/PKCS5Padding -