If I have a string saying "abc.txt"
, is there a quick way to get a substring that is just "abc"
?
I can't do an fileName.IndexOf('.')
because the file name could be "abc.123.txt"
or something and I obviously just want to get rid of the extension (i.e. "abc.123"
).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…