Get last 5 characters in a string

前端 未结 8 1624
青春惊慌失措
青春惊慌失措 2020-12-09 15:14

I want to get the last 5 digits/characters from a string. For example, from \"I will be going to school in 2011!\", I would like to get \"2011!\".<

8条回答
  •  鱼传尺愫
    2020-12-09 16:06

    Old thread, but just only to say: to use the classic Left(), Right(), Mid() right now you don't need to write the full path (Microsoft.VisualBasic.Strings). You can use fast and easily like this:

    Strings.Right(yourString, 5)
    

提交回复
热议问题