好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

使用split方法解析路径

Use the split() function in the path Pub package to split a path into its components.

 import 'package:path/path.dart' as path;

main() {
  print(path.split('/Users/shailen')); // Prints ['/', 'Users', 'shailen'].

  // Windows example.
  print(path
      .split(r'C:\tempdir\tmp.txt')); // Prints [r'C:\', 'tempdir', 'tmp.txt'])
} 

查看更多关于使用split方法解析路径的详细内容...

  阅读:64次