string

How do they search inside a string

What is the most efficient way to do this? There must be some better method other than brute force. ...

Checking if 1 item or more in a delimited string exist in another

Hi all, Which is the best way to check if 1 item or more of one delimited string exist in another? I'd like to pass 2 delimited strings to a UDF and get back TRUE if at least one item of the first delimited string exists in the second delimited string. delStr1="US,FR,DE" delStr2="GB,DE,CA,IT,PL" delStr3="CN,DK" CheckDelimitedStrin...

how to load html code into c# string?

HI, I've got a really seriously question. I need to send HTML code, so I have to load html into string, and this obvious doesn't work if I can't interpret them well, how can I store it natively? Thanks for your help ...

String String Buffer class,String Builder class difference

StringBuffer sb=new StringBuffer("Hello"); sb.append("welcome");//working sb.concat("hi");//not working Why can't i use concat here?? ...

regular expression help

Hay i have a string like [gallery GALLERYNAME] [gallery GALLERYNAME] the GALLERYNAME indicates a name of a gallery What would a regular expression looks like to match this string? ...

EOF while scanning triple-quoted string literal

i've looked on the web and here but i didn't find an answer : here is my code zlib.decompress(""" xワᆳヤ=ラᄇHナs~Ʀᄑç\ムîà Z@ÑÁÔQÇlxÇÆïPP~ýVãì゙M6ÛÐ|ê֭ᄁᄂヤ=)}éÓUe﬿ö3ᄎᄌú"}ʿïÿ÷1þ8ñ́U÷ᄏñíLÒVi:`ᄈᄎL!Ê҆p6-%Fë^ヘ÷à,Q.K!ユô`ÄA!ÑêweÌ ÊÚAロYøøÂjôóᅠÂcñ䊧fᆴùテúN :nüzAÝ7%ᄌcdUタᄌ3ôPۂタlンyHᆲᄑ$/yzᄒíàヌ'ÕÓ&`|S!<'ᄂ÷Zļᄐ2ホモ;ニ(ÅÛfb!úü$ナテᄒ,9ßhàPᄎᄄێフÑbØὛホQᄍ-Ü}(n;ᄄホLヤ\^ï9ᆭᄍラ...

Using a batch file to extract the variable part of a string to use in renaming txt files

I'm using batch files to process text files with names of the form: CLL*1.txt, CLLM*2.txt located in a specific "download" folder. All files contain a string of the form: "File Reference : 0xxxx", where xxxx is a unique numerical identifier. I am trying, without much success, to use the following script to rename the file to CLL*xxxx...

String Manipulation Methods giving RunTime Error.

This seems to be giving me a bit of trouble. This method is supposed to generate a random number and assigns it to a char. getline grabs the entire string from the text file and assigns it to foods. y has the purpose of holding the place of where it finds c in the foods string. It will then use that int to erase from the string and prin...

Convert a string to an xml file in android

Hi, Can anybody tell me how to convert a string to an xml file in android? Thanks ...

Convert to string/text ruby

Hi, I'm using the following code to download a page through a POST request: require 'net/http' require 'uri' res = Net::HTTP.post_form(URI.parse('http://example.com'),{'post'=&gt;'1'}) puts res.split("Date") The URL I originally used has been replaced with example.com It works great, but when I try to call split (last line) it return...

How to get the number of differences in a string comparison?

I know I can get whether 2 strings are equal in content, but I need to be able to get the number of characters that differ in the result of comparing 2 string values. For instance: "aaaBaaaCaaaDaaaEaaa" "aaaXaaaYaaaZaaaEaaa" so the asnwer is 3 for this case. Is there an easy way to do this, using regex, linq or any other way? EDIT:...

Choose For Random Strings In Commodore 64 BASIC

I have this variable declarations on my program: X="MAGENTA" Y="CYAN" Z="TAN" A="KHAKI" Now what I want is to randomly choose one of these and PRINT it. But how to do this? ...

Split string... tersely

Possible Duplicate: C#: Convert string to model Let's say I need to take a string and turn it into an array. This string has a single universal character to denote a new element. For example, I want to turn this string: var s = "first|second|third"; Into this array: var segments = new[] { "first", "second", "t...

Reading XML as string in Java

Could somebody help me with this. I would like to know how to read this example as string? I know how to read first one but don't know how to read them all <Tr rn=\"000000000000000\" vr=\"T\" sSpre=\"S\" reg=\"P\" dSpre=\"2000-01-01\" dOdprt=\"2000-01-01\" iban=\"SI00\" eno=\"R\" vir=\"B\" maticnaPps=\"0000000000\"><Imetnik davcna=\"000...

Question about python string

i have been asked to write a function which should be called in this way foo("Hello") This function also has to return values in this way: [Hello( user = 'me', answer = 'no', condition = 'good'), Hello( user = 'you', answer = 'yes', condition = 'bad'), ] the task has clearly asked to return string values. can anyone understand the...

Using C#, how can I replace similar words?

Hi, Assuming these two strings: string s1="control"; string s2="conrol"; (or "ocntrol", "onrtol", "lcontro" etc.) How can I programatically find that s2 is similar with s1 and replace the s2 string with the s1 string? Thanks. Jeff ...

How to create Date object from the string date in Javascript for the first years of A.D ?

Hi folks, I have next date string: "Thu Nov 14 0002 01:01:00 GMT+0200 (GTB Standard Time)" and I'm trying to convert it to the Date object: date = new Date("Thu Nov 14 0002 01:01:00 GMT+0200 (GTB Standard Time)") => Invalid Date {} and it doesn't work. And date = new Date("Thu Nov 14 2 01:01:00 GMT+0200 (GTB Standard Time)")...

how to merge four hexa digits into 3 hexa digits in C#

hi, consider the following code: string x="3F"; //0011 1111 string y="3F"; //0011 1111 string result="FFF"; where x is 6 bits and y is 6 bits but each one comes from different place and merging them into 3 hex-decimal digits is the required operation...how to do that in C#. note: x,y max value is 3F so no overflow will occur. also i...

Split strings in mysql

Hi All, I want to create a stored procedure which will do matching of two tables. My requirement is to match two tables based on the columns user passes as an input. Syntax: CREATE PROCEDURE reconcile.matchTables(IN TAB1 VARCHAR(25), IN TAB1 VARCHAR(25), IN COLS1 VARCHAR(250) , IN COLS2 VARCHAR(250)) EX: matchTables('table1', 'table2...

How to add a new line character to a string using a custom font in cocos2d?

How do you add a new line character to a string when using a custom font in cocos2d? I have my atlas font and i tell i put the new line character into it and then tell it what font to use. CCBitmapFontAtlas *text = [CCBitmapFontAtlas bitmapFontAtlasWithString:@"Something\nSomething else " fntFile:@"generic_font.fnt"]; In the .fnt fil...