I have got this one:
string = 'abcdefgh'
string(1:3) = 'abc'
Is this possible string(-6:1) = 'abcdef'
.
I know this is not possible , what is the closest that is possible ; something which is similar to Python substring syntax.
Edit : I want to get rid of .jpg
and C:
from C:/hello.jpg
to get just hello
. Using strsplit twice is just cumbersome . I just know the length of C:
and .jpg
, but not of the whole string.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…