C#Stringbuilder在某个字符后选择一个int [英] C# Stringbuilder select an int after a certain characther

查看:117
本文介绍了C#Stringbuilder在某个字符后选择一个int的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我想从字符串中选拔一个字符之后选择一个整数.这是用于选择$符号后的商品价格.例如,芝士汉堡$ 5.00.有什么办法可以从该字符串中获得5.00,而无需对其进行硬编码.非常感谢您的帮助

Hi guys I am trying to select an integer after a cetain charachter from a string. This is for selecting the price of an item after the $ sign. for example Cheese Burger $5.00. Is there any way I could get the 5.00 from that string without hard coding it. Thanks alot for your help

推荐答案

签名.例如Cheese Burger
sign. for example Cheese Burger


5.00.有什么办法可以从该字符串中获得5.00,而无需对其进行硬编码.非常感谢您的帮助
5.00. Is there any way I could get the 5.00 from that string without hard coding it. Thanks alot for your help


不支持StringBuilder.
但是,使用字符串很容易.
您可以使用:
Not with StringBuilder.
However, it''s easy with a string.
You can use:
string input = "Cheese Burger


这篇关于C#Stringbuilder在某个字符后选择一个int的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆