Quantcast
Channel: Active questions tagged string-manipulation - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 186

What's a simple way to drop a file extension from a string: e.g. "filename.txt" ->"filename" [closed]

$
0
0

Given an arbitrary filename string:

e.g. "script.m", "textfile.txt", etc.

write a function that has the following behaviour:

dropExtension /@ {"script.m", "textfile.txt"}(* {"script", "textfile"} *)

Viewing all articles
Browse latest Browse all 186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>