| | |
string manipulation
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2008
Posts: 6
Reputation:
Solved Threads: 0
Hello...consider the following:
Hope this helps...
C# Syntax (Toggle Plain Text)
string testString = "Sometime"; int startPos = testString.Length - 4; //call the string.Remove(int startPosition) method that deletes characters //starting from that specified position. //new string should show "Some" testString = testString.Remove(startPos);
Hope this helps...
C# Syntax (Toggle Plain Text)
string test="GoodLuck"; test=test.Substring(0,test.Length-4);
This will remove the last four characters from the string
Thanks and Best of Lusk,
Farid ud din Masood
MS.c (CS)
University of Agriculture, Faisalabad
Farid ud din Masood
MS.c (CS)
University of Agriculture, Faisalabad
![]() |
Similar Threads
- Help Please - with String Manipulation (C++)
- string manipulation (C)
- VBScript string Manipulation Help (ASP)
- C String Manipulation (C)
- Erroneus outputs in string manipulation simple program (C++)
- leak using c++ string (C++)
Other Threads in the C# Forum
- Previous Thread: 3D Graphic in C#?
- Next Thread: cannot parse custom config section
| Thread Tools | Search this Thread |
.net access algorithm array asp barchart bitmap box broadcast buttons c# check checkbox client column combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development display draganddrop drawing encryption enum equation event excel file form format formbox forms formupdate function gdi+ httpwebrequest image index input install java label linux list listbox mandelbrot math mouseclick mysql networking operator packaging parse path photoshop picturebox pixelinversion post powerpacks programming radians regex remote remoting reporting richtextbox robot server sleep socket sql statistics stream string table text textbox thread time timer transform treeview update usercontrol validation visualstudio webbrowser wfa windows winforms wpf xml





