[英]How to check if my string contains a hyphen, and if it does, how to fetch the string before that hyphen?
The string should contain only one hyphen, eg.if the string is ABC-123, then I need to fetch ABC字符串应该只包含一个连字符,例如,如果字符串是 ABC-123,那么我需要获取 ABC
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.