string

Create Unicode double underline string in C#

I want to use a Unicode character such as '\u033F' and build a continuous double-underline string. This would be used to underline totals in a report. Just using "===========" is not acceptable. How would I do this in C#? Everything I try just leaves me with a single character? Many thanks. ...

SQL Reporting Services empty string handling

Hello, I'd like to display a string without the last 2 chars in a text field in Reporting Services 2005 vs2005. I tried several ways and if the string is empty or null I get an error: rsRuntimeErrorInExpression - The value expression for the textbox contains an error: Argument 'Length' must be greater or equal to zero. Here are the way...

RegEx to modify urls in htmlText as3

Hi, I have some html text that I set into a TextField in flash. I want to highlight links ( either in a different colour, either just by using underline and make sure the link target is set to "_blank". I am really bad at RegEx. I found a handy expression on RegExr : </?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)/?> b...

How to generate all possible 3-chars strings in c# ?

The question is : How to generate a list of all possible 3-chars strings in c# ? ...

How to reverse String To Binary

foreach (byte binaryOutupt in Encoding.ASCII.GetBytes(fileLine)) { fileOutput.Write(binaryOutupt.ToString("x2")); } I got this code which let me convert string byte to hex but how do I reverse this? ...

Java newbie: infinite loop searching for specific text in a file

I'm needing to locate a string on a particular line in a text file that is composed of several lines of strings. However, my loop to find the text or the end of the file is eternally searching. I know the string is in the file. Here is the code I am using to locate the text - but be warned, if you try it on your system even with a simple...

can constructors actually return Strings?

Hi all, I have a class called ArionFileExtractor in a .java file of the same name. public class ArionFileExtractor { public String ArionFileExtractor (String fName, String startText, String endText) { String afExtract = ""; // Extract string from fName into afExtract in code I won't show here return afExtract; } Howeve...

How can I reverse a string that contains combining characters in Perl?

I have the the string "re\x{0301}sume\x{0301}" (which prints like this: résumé) and I want to reverse it to "e\x{0301}muse\x{0301}r" (émusér). I can't use Perl's reverse because it treats combining characters like "\x{0301}" as separate characters, so I wind up getting "\x{0301}emus\x{0301}er" ( ́emuśer). How can I reverse the str...

Linux command line: split a string

Hi, I have long file with the following list: /drivers/isdn/hardware/eicon/message.c//add_b1() /drivers/media/video/saa7134/saa7134-dvb.c//dvb_init() /sound/pci/ac97/ac97_codec.c//snd_ac97_mixer_build() /drivers/s390/char/tape_34xx.c//tape_34xx_unit_check() (PROBLEM)/drivers/video/sis/init301.c//SiS_GetCRT2Data301() /drivers/scsi/sg.c/...

php string variables in gettext

Hello, How does gettext translate string variables? It doesn't seem to want to do it.. lets say I have $sentence = "Hello World"; and then I want to echo ($sentence); ... how can I do that so that I can translate what's inside $sentence in Poedit?I can use -> echo sprintf(("%s test"), $sentence) and this will print "Hello World test" in...

Python string 'join' is faster(?) than '+', but what's wrong here?

I asked the most efficient method for mass dynamic string concatenation in an earlier post and I was suggested to use the join method, the best, simplest and fastest method to do so (as everyone said that). But while I was playing with string concatenations, I found some weird(?) results. I'm sure something is going on but I can't not ge...

simple regex -- replace underscore with a space

Hey, I'm writing my first Rails app, and I'm trying to replace the underscores form an incoming id name with spaces, like this: before: test_string after: test string How can I do this? Sorry if this is a bit of a dumb question, I'm not very familiar with regular expressions... ...

PHP & MySQL Input String Escape Problem

Hello, I've a weird string escape problem with my PHP script. I'm trying to get data from iSnare and put them into MySQL table. I'm reading POST data and escaping strings with mysql_real_espace_string() function, also I can insert same data to .txt file without a problem but when I try to insert data into table, it cuts the string from...

PHP - Search a filename for php

Hello! I wan't to search a filename for example like this string: $filetype = "file.php.jpg"; And then i want to search if it finds php in that string, then return false; Now if a filename is named php-logo.jpg i don't want it to be denied. Maybe we should consider searching for .php. in the string? ...

php string variables in gettext (forgot one case scenario)

I've posted a question yesterday but I just realized that the answer doesn't seem to be working for a certain situation. The post was http://stackoverflow.com/questions/1349159/php-string-variables-in-gettext/1349209#1349209 and here is what I asked about: Hello, How does gettext translate string variables? It doesn't seem to...

String losing data when assigning to TStringList

Hi there. I have this method, var s : TStringList; fVar : string; begin s := TStringList.Create; fVar := ZCompressStr('text'); ShowMessage( IntToStr(length(fVar) * SizeOf(Char)) ); //24 s.text := fVar; ShowMessage( IntToStr( length(s.text) * SizeOf(Char)) ); //18 end; The ZCompressStr is from http://www.base2ti.com/zlib.htm with...

Why are there so many string types in MFC?

LPTSTR* arrpsz = new LPTSTR[ m_iNumColumns ]; arrpsz[ 0 ] = new TCHAR[ lstrlen( pszText ) + 1 ]; (void)lstrcpy( arrpsz[ 0 ], pszText ); This is a code snippet about String in MFC and there are also _T("HELLO"). Why are there so many String types in MFC? What are they used for? ...

java basics about String

To what value is a variable of the String type automatically initialized? ...

JavaScript array element to string

i have a simple array and i want to generate string which include all the elements of the array, for example: The array is set as follow: array[0] = uri0 array[1] = uri1 array[2] = uri2 And the output string must be teststring = uri0,uri1,uri2 I've tried to make this following way (using for loop): var teststring = ""; teststrin...

Split Twitter RSS string using Python

Hi, I am trying to parse Twitter RSS feeds and put the information in a sqlite database, using Python. Here's an example: u'MiamiPete: today\'s "Last Call" is now up http://bit.ly/MGDzu #stocks #stockmarket #finance #money' What I want to do is create one column for the main content ("Miami Pete....now up)", one column for the URL ("ht...