function getFileNameFromPath(path) {
var ary = path.split("/");
return ary[ary.length - 1];
}
==================================
var unix_path = '/tmp/images/cat.jpg';
console.log(unix_path.split(/[\\\/]/).pop());
var win_path = 'c:\\temp\images\cat.jpg';
console.log(win_path.split(/[\\\/]/).pop());
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO.Ports; namespace SerialTest1 { public partial class Form1 : Form { delegate void MyDelegate(); //델리게이트 선언(크로스 쓰레드 해결하기 위한 용도) bool SendForamt = true; // true : ASCII false : HEX bool ReceiveFormat = true; // true : ASCII false : HEX public Form1() { InitializeComponent(); ...
댓글