当前位置:网站首页>How do I get the last part of a string- How to get the last part of a string?

How do I get the last part of a string- How to get the last part of a string?

2022-07-07 07:18:00 Rich in starch

problem :

Given this string: Given this string :

http://s.opencalais.com/1/pred/BusinessRelationType

I want to get the last part of it: "BusinessRelationType" I want to get the last part of it :“BusinessRelationType”

I have been thinking about reversing the whole string then looking for the first "/", take everything to the left of that and reverse that. I've been thinking about reversing the entire string , Then find the first “/”, Move everything to its left and reverse it .However, I'm hoping there is a better/more concise method. however , I hope there is a better / A simpler approach .Thoughts? idea ?

Thanks, Paul thank you , Paul


Solution :

Reference resources : https://stackoom.com/en/question/EDAc
原网站

版权声明
本文为[Rich in starch]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130712538949.html