Tagged Questions

A string is a sequence of zero or more characters commonly used to represent text; in most languages a string is a data type. For more details, see the Wikipedia's entry on String.

learn more… | top users | synonyms (1)

0
votes
0answers
37 views

String sorting based on first latter of string [closed]

How can I sort String array based in first Letter of string?
2
votes
3answers
105 views

Splitting a string into tokens in C

I am trying to improve my skill in C, and this time by getting away from strtok. The following code splits the input string into a token_list, an array of strings. #include <stdio.h> #include ...
0
votes
0answers
13 views

Excel search string + offset formula help [migrated]

This is probably a very simple Excel 2003 formula but I'm having trouble with a search part. I would like to offset the cells in a particular column "D" which have the term "USA" in them one cell to ...
2
votes
1answer
70 views

Is this String concatenation creating extra String?

Using the eclipse formatting on a class with some @NamedQueries created concatenations. While I have been doing this for years without paying attention I just realised that may be it is not a good ...
1
vote
3answers
137 views

Determining length of a char* string in C++

I was looking to do with sizeof() for about an hour and I just gave up, here is my code, as minimal as I can make it, I was wondering if there was a less crude way of doing the const char * as a ...
8
votes
4answers
250 views

Good method to check whether a string is a valid number?

I'm developing a Java Helper Library which has useful methods developers don't want to type out over and over. I'm trying to think of the best way of checking whether a string is a valid number. I've ...
1
vote
2answers
90 views

Find two equal substrings in a string

I have various strings that contain codes, e.g. like this: "file = new JarFile(new File()" + "\nSystem.out.println(file" but also "args" Now I want to find the substring that is in the beginning ...
0
votes
1answer
74 views

Manipulate XML files in c#

I just finished my working code, but still want to improve it. I want to transform this input: <item>asdf</item> <item>asdf</item> <item>asdf</item> to this ...
13
votes
9answers
604 views

Most efficient way in C++ to strip strings

If I want to strip a string completely of its whitespaces, punctuation and numbers (i.e. anything that is not A-Z, a-z), what is the most efficient way of doing it in C++? I tried this: string ...
3
votes
4answers
197 views

java Build a sentence from tokens / words in a String-Array

I'm facing an interesting issue at the moment: My Situation: I'm having (in java) String-Arrays like the following (more complicated, of course). Each String-Array represents one sentence (I cant ...
2
votes
1answer
95 views

Please review this String operation

I need to remove last text after : in my String and : too. I have tried this. Please review. If there is a better way to do, please tell me. String test = "temp:content:region:deposit:up"; ...
1
vote
2answers
160 views

Messy c# code - can be improved? String Parsing

For various reasons, I'm parsing a string, this code will explain what I'm after: string baseString = "This is a \"Very Long Test\""; string[] strings = baseString.Split(' '); ...
3
votes
1answer
124 views

Review my balanced delimiter method

I was trying to solve the following Programming Praxis problem. The problem is as follows: Write a function that takes a string and determines if the delimiters in the string are balanced. The ...
0
votes
0answers
47 views

Common Lisp code to generate a list of strings

I wrote this bit of Lisp code. I'd appreciate comments for improvement, including comments about formatting, design (including choice of data stuctures) and performance. This was tested with sbcl ...
2
votes
1answer
77 views

Easiest way to delete everything between two quotes in a string?

Is this the easiest way to delete everything between and including the two first quotes (if there) in an std::wstring? unsigned int firstQuotePos = logFileName.find_first_of(L"\""); unsigned int ...

1 2 3 4 5
15 30 50 per page