Get Second to last character position from string

前端 未结 10 1831
再見小時候
再見小時候 2020-12-19 08:11

I have a dynamically formed string like - part1.abc.part2.abc.part3.abc

In this string I want to know position of second to last \".\" so that i can split string as

10条回答
  •  猫巷女王i
    2020-12-19 08:45

    You can use String.Split() method, which returns an array of the splitted items. You can then concatenate the first 2 and leave the last one.

提交回复
热议问题