| | |
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 |
Tag cloud for C#
.net access algorithm array barchart bitmap box buttons c# chat check checkbox class client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees draganddrop drawing encryption enum event excel file files form format forms ftp function gdi+ httpwebrequest image index input install java label list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox pixelinversion post prime programming radians regex remote remoting resource richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





