View Single Post
Old 01-21-2006, 10:01 AM  
RocketFlow
Confirmed User
 
Join Date: Jun 2005
Posts: 169
Quote:
Originally Posted by Validus
Thought I?d ask here, maybe some body knows.

I want to shorten the value of a string to 50 characters. Any tips? Kind of like substr() in PHP?
Here is your example in C#:

Code:
String myLongString = "This is a very long text. This is a very long text. This is a very long text. This is a very long text. This is a very long text. This is a very long text. This is a very long text. ";
String myShortString = myLongString.Substring(0, 50);
HTH
__________________
RocketFlow.com - Premium Hosting Services - Unrivaled Speed, Unbeatable Service
ICQ #234-583-306 or 234-628-183
RocketFlow is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote