Tagged Questions
5
votes
2answers
61 views
Convert string to multiline text
I made this method that takes any string and transforms it into a multiline text l; each line having the max (character) length specified by the rowLength ...
3
votes
3answers
426 views
Beautifying Dates
There has got to be a better way to do this. I have a method which returns either your standard "01/01/2014" Date or "January 1st, 2014" Date of the assembly file write time. Any suggestions on ...
6
votes
2answers
120 views
Tight loop, string manipulation and calculations
I'm working on some precompilation operations for a world compiler. Currently to identify flags placed by the level designer I need recognize when a specific entity exists at specific coordinates from ...
5
votes
1answer
119 views
String modification application
Below is working code of a semi complete program. Its purpose is to take an input string of any type and modify it based on rules defined for each type. So in this example I pass it a string in CSV ...
3
votes
1answer
216 views
Searching text files for string patterns that are each defined in their own classes
I'm trying to implement interfaces in my design but not sure if this is correct or if there is a better way to do it.
What I need to do is
open a text file
keep searching blocks of text until I ...
5
votes
1answer
107 views
Inserting text file rows into an Access DB - Optimizing
How can I improve my inserts?
I am trying to speed up the process of inserting all of the rows in my text file into an Access DB. I originally switched to this route because of the size of those text ...
2
votes
2answers
171 views
Should I create an empty string and append through a foreach loop or should I use StringBuilder? [closed]
Here's the current code:
...
3
votes
3answers
140 views
String Extension improvement
I am creating a string extension to validate some input.
My scenario is when we have a string it will format it according to following guideline.
If the sample string is “One Two Three Four Five” and ...
3
votes
3answers
136 views
Select case string comparison
I have a select case that checks against a string variable. It's starting to get large and I am wondering if there is a better way of doing this?
Here is a sample of the ...
11
votes
3answers
465 views
Reusing strings read from I/O
I am working on an application that reads lots of data from the network and puts it in a grid. I noticed that I could save some memory by reusing existing strings instead of always using the new ...
3
votes
1answer
2k views
Convert .NET DateTime to a string using ordinals
With a DateTime object, it's easy to get, for example, 11 October 2011 by using:
d.ToString("d MMMM yyyy");
However, there ...