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. It is also used to represent a sequence of bytes encoding arbitrary binary data. For more details, see the Wikipedia entry on String.

learn more… | top users | synonyms (3)

0
votes
2answers
34 views

Regular expression for finding a word

I have a long string of characters as input and I want to count the number of words in that string. How can I do it through regular expression?
0
votes
5answers
58 views

extracting values from string in JavaScript

Given a string of the form "(a,{b:c,d:e,f:g},h})", I want to extract a,c,e,g,h from the string. i.e. string will always contain 3 parameters, where 2nd parameter is of the form {b:c,d:e,f:g} i.e. it ...
0
votes
2answers
41 views

C# Recommended way of performing a custom encoding of a string

So, my question is fairly simple. I have a string and I want to be able to use it in urls. Simple, right? The tricky part is, however, I want a custom way of encoding it. You see, my language is full ...
0
votes
2answers
14 views

Button and String incompatibility from an Array in AS3

So I have an inventory with items and the array has the instance name of the items, which are movieclips. I want to make it so that all the items will have their button mode become true. Everything ...
0
votes
5answers
84 views

Simple Java Strings

So, I was wondering what the difference was between this: first = "Hello!" and: String first = "Hello!"
3
votes
1answer
50 views

Count number of lines with javascript

I need to trim a dynamic text in order to make a 2 lines excerpt out of it (a teaser). The problem is that the number of lines that takes a displayed string within a div depends on the characters used ...
2
votes
4answers
366 views

Delete last occurrence in string

I am trying to trim a string to the first occurrence of a specific word in a single string of comma separated words. E.g.: deleteLastOccurrence("foo,bar,dog,cat,dog,bird","dog") should return ...
-3
votes
0answers
73 views

Python: if string == array[0] not working as expected [closed]

I'm missing something stupid here. I tried ==, is, and dropping the values in a set and doing an x in x compare, yet nothing is working the way I expect. when info[4] = graya the IF block doesn't ...
1
vote
1answer
14 views

Manipulate each line of string property using Ant

I have a line delimited list of Javascript files that I loaded to a property using loadfile. <loadfile property="src-files" srcfile="${manifest.file}"/> I want to wrap each filename in an ...
0
votes
2answers
21 views

How to optimize this call to a string of static and dynamic strings? (JavaScript/Node.JS)

I have this snippet of code which I simplified for the sake of this question: //var a is generated once at runtime //from an array of strings //and an array of functions var a = [ "Start ...
0
votes
3answers
54 views

Remove part of String following regex match in Java

I want to remove a part of a string following what matches my regex. I am trying to make a TV show organization program and I want to cut off anything in the name following the season and episode ...
1
vote
2answers
39 views

PHP - Need to remove duplicate characters within a String but would like to include exceptions

I have been searching all over the internet for a solution, but could not find one. I need to remove duplicate characters within a String but would also like to include an exception to allow a ...
-2
votes
2answers
35 views

Match a whole word in a String in AS3

I need some help matching a whole word from a string. Can anyone recommend a way to do this? Example: var keywords:String = "att, attractive, attaboy, attack, attach"; I want to be able to search ...
-1
votes
1answer
18 views

XSL how to check for commas in a url?

<xsl:choose> <xsl:when test="./link/@href "> <td class="link"> <a href="{@href}"> <xsl:copy-of select="./link/@href"/>Link</a> </td> ...
0
votes
2answers
17 views

iphone string replace only the first occurrence with another string

I have a string in iphone that looks like the following one: my.whatever.string.with.unknown.length=something whatever something = something .... = whatever I want to replace only the FIRST "=" ...

1 2 3 4 5 1597
15 30 50 per page