I have a string "00_123.txt"
. I want to get first part of the string before "."
, that is simply "00_123"
I found the substring("00_123.txt", 0, stop)
can do it. But the problem is that I don't know where to stop
, because the length of "00_123" can be changed.
How can I do that?