Getting all text at start of a string

Hello,

I have a string (from a weather feed) that looks like:

Monday: Mainly Sunny, 25.5°C 


Is it possible to get everything before the :
So I can just get the day, and not the conditions


The idea is that the feed looks like
Monday: asdsfasf
Monday Night: asdsfasf
Tuesday: AFASF
etc,


Thanks 

0
falsead
8/1/2008 5:27:55 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

1 Replies
982 Views

Similar Articles

[PageSpeed] 1

Try this: 

string s = "Monday: Mainly Sunny, 25.5°C";
string d = s.Split(':')[0];

Thanks, Ed

Microsoft MVP - ASP/ASP.NET

0
ecbruck
8/1/2008 5:36:46 PM
Reply:

Similar Artilces:

Where to start and how did you get started?
Hi, I have had a feeling for a long time to jump into the adds market for some time due to my low income (shooting for the stars) and I don't have anything better to do these days. But I find it really difficult not to give up due to lack of guides (what I can find atleast) and all the hard words which only makes me confused. But I won't give up. Never. Not sure if this is the right place to post this, but I deffinitly would be really greatfull for help getting started. How did you get started? +If there are any teacher that wanna show me the ropes private, I can give payment with ...

how to get start with .NET
the net help people installed  to my desktop 1-microsoft visual studio .NET enterprise developer 2003 2-microsoft .NET framework 1.1 what else do i need ...???  and how can i try with some simple code in VS.Net and run it to see wat happen...????? please help If you want to develope web applications, then you'll also need IIS on your PC.  That'll require XP-Professional or Windows 2000/2003, but XP-Home edition won't allow IIS installation. As for how to get started, you can search the web for some tutorials or buy a good book on VS.  The topic is way too vast to...

Getting Start With .net
hi i'm intersted to learn asp.net (vb or delphi) . i programming with delphi6 but i'd like to tp know something about programming in internet specially with .net . i hear about microsoft.net with delphi 7 that i can programming with delphi in .net .... is it right ? what 's our opinian about it ? and better to learn Vb.Net or continu with delphi(or delphi.net) thanks. Ali Darabian I think there is some support for Delphi in .Net. However, you will find much more support from the user community if you choose a more popular language such as VB.Net or C#. Since your al...

Truely just getting started, so where should I start?
I've already been working a thread on a good reference/learning book.  but truely I'm just getting started.  I've a background with HTML and some CSS But this is my first foray into any sort of application language.  I've had an interest in PHP and ASP but have only recently started to make the effort to learn.  I'm starting with the videos available here and they are great for learning the development application but I've not the programming background to easily absorb some of the more programming based processes.  I've no college resources where I'm at other than o...

trying to get started and i am getting this error
when i go to http://www.porkchopsplayground.com, i get: DotNetNuke Upgrade Error The Assembly Version ( [ASSEMBLYVERSION] ) does not match the Database Version ( [DATABASEVERSION] ) ERROR: Could not connect to database. Could not find file 'd:\hosting\nmoran26\Providers\DataProviders\AccessDataProvider\DotNetNuke.mdb'. Any suggestions will be appreciated. Thanks, Nicole Do you have a username and password set on your database? Make sure you follow the steps mentionned in the Readme.txt located in the documentation folder. In any case make sure your credentials for yo...

getting started in VS2005 C# which book should I get
Hello, I am getting started with VS2005, I have use VS2003 but not very much -(I did 4 small applications in it),  I am wondering which book you would recommend to learn the new features of VS2005, while learning more of C# programing in general There some links to good books in this thread i posted : http://forums.asp.net/thread/1489422.aspx Also these two make good reference material  Professional Visual Studio 2005 (Programmer to Programmer)   Microsoft Visual Studio 2005 Unleashed  So far I recommend Wrox's C# 2005  Read the beginning chap...

get rid of that ridiculous getting started bookmark
Name: DOCTOR Product: Firefox Summary: get rid of that ridiculous getting started bookmark Comments: Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see it. ...

Getting started .net website
Hi folks,Does anyone here know of a good website to just sit back and read for learning .net? Thanks in advance.Baldeep Right here... Click the Get Started and Learn sections here. Quite a few out there - - this one, has a lot of good videos -  also ASPNet101.com, but then, I might be a little prejudiced David WierMCP/ASPInsiderASPNet101.com - where to look first!Please Vote for ASPNet101 - 'Best Community Resource'!Control Grouper - easily control properties for multiple controls with one control!Calendar Express - The Best HTML Calendar Generator on the web!(P...

Getting started with JScript.NET
I'm a Javascript and Actionscript developer, and the thought of being able to do server-sides in something I know was too good to resist. Does anyone know some good tutorials for developing ASP.NET pages in JScript?  I can find lots of console code, but simple things are hard: like I can't even figure out how to print something out to the web page (just a string). What I'm really trying to do is access a database, verify a login, and print JSON out to the response.  What should I do to start?  Is there a better way to do this? (IE: using some JSON library already?). I'm commun...

Getting Started with .net and a few questions
Hello I've done some asp and php programming along with various other languages in the past and slowing getting my head around .net.I have a small project of creating a Holiday Booking system on our Intranet and just trying to get the first part to work properly will hopefully get me sorted for the whole project. The Intranet is running on .net 2 and I prefer to use the VB code rather than C#. This is connecting to an SQL server.My initial page that I am trying to create is just for an admin user to view which dates in a table have been specified as Bank Holidays and be able to add ...

How do I get started with AJAX.Net?
Hi All, I'm a seasoned asp.net developer but have not yet ventured into atlas et al.  I prefer books, but will take whatever I can get if it's good and will get me going. Any recommendations? Thx in advance. Jeff try here first http://ajax.asp.net/downloads/default.aspx?tabid=47 then learn from sample and docJames Wu (MIB426).NET is only way to goMCP, MCSE, MCDBA, MCSD, MCAD I find the materials online display features and implementations but are lacking architectural depth, and am seeking more comprehensive resources. By architectural depth, I mean that I cannot watch ...

POST GET GET GET GET... WTH?
Hi, I'm at a loss to explain this... I have an ASPX page that I can't always navigate to. When I developed the app (it's Starter Kit Portal-based), I did it on my LAN and have had no trouble accessing the page. However, upon deployment, I see the following behavior: 1. POST request goes out looking for MyForm.aspx 2. GET request for MyForm.aspx 3. GET request for MyForm.aspx 4. ... X. GET request Sometimes, the page finally loads. Other times, it just ends up blank. Many times, it doesn't load at ALL the first POST - I just get a "The pa...

How can I get conky start automatically when I start fvwm?
How can I get conky start automatically when I start fvwm? I setup the conky under fvwm session for my Opensuse 11 but it won't start automatically. I am wondering how to write some kind of scripts to force it to start automatically and with a delay about 10 seconds after fvwm starts. Thanks a lot. :P -- ggyyree ------------------------------------------------------------------------ Maybe this will help you: 'Conky Hardcore! � ssc.sh' (http://conky.linux-hardcore.com/?page_id=503) -- Coffee is like Linux, only cool people use it. Tea is like W...

Problem Getting Started
In have run the 1317set.bat file and still get the following error: Unable to get your db version please run version script against your db and restart your web application (go to update/scripts/ folder and run 1317set.bat). Any help to get me started would be much appreciated.www.creativenrg.co.uk | www.therivercard.com Have you checked your connection string? This is sometimes caused by a faulty db connection. I am new to Rainbow and get the same error when trying to run it for the first time. Does not matter which of the following I comment out in web.config: <!-...

Web resources about - Getting all text at start of a string - asp.net.getting-started

Calm urged after Ohio grand jury doesn't indict officers in killing of Tamir Rice
6abc.com Calm urged after Ohio grand jury doesn't indict officers in killing of Tamir Rice 6abc.com Officials are urging calm as they brace ...

Fox Guest Blames ‘Liberal Bias’ By PolitiFact For So Many Donald Trump Lies
Fox guest Mercedes Schlapp argued with a straight face that if PolitiFact wasn’t partisan, it would have found an equal number of “True” statements ...

The 5 most annoying things about ‘Star Wars: The Force Awakens’
Despite the onslaught of praise directed at Star Wars: The Force Awakens , I can't help but feel that the film's rave reviews are undeservedly ...

Apple dominates holiday shopping season; iOS accounted for 49% of new device activations
Shares of Apple may be slumping, but the company's products continue to resonate with consumers in impressive fashion. During the Christmas holiday ...

Samsung's Bio-Processor chip that has built-in support for measuring body fat, muscle mass, heart rate ...
Jacob Kastrenakes / The Verge : Samsung's Bio-Processor chip that has built-in support for measuring body fat, muscle mass, heart rate, skin ...

Belgians arrest 2 accused in New Year's terror plot
NDTV Belgians arrest 2 accused in New Year's terror plot CNN (CNN) Belgian authorities have arrested two people on suspicion of being involved ...

Did James Harden dump ‘moody’ Khloe Kardashian on Christmas day?
Help me, because I actually want Khloe Kardashian’s haircut in this ^^ photo. It’s a great length, right? We should do a poll: should I get a ...

San Francisco's Housing Shortage Threatens African Americans
Space-strapped San Francisco mines historic African American neighborhood for housing, retail

`Lemmy' Kilmister, Founder of Rock Band Motorhead, Dies at 70
Newsweek `Lemmy' Kilmister, Founder of Rock Band Motorhead, Dies at 70 Bloomberg Lemmy Kilmister performs with Motorhead during the Hellfest ...

'Affluenza' teen arrested in Mexican resort after weeks on the run
The "affluenza" teen is once again in police custody after weeks on the run, and may finally face jail time. Ethan Couch, the drunk-driving ...

Resources last updated: 12/29/2015 2:46:09 PM