I have a string with quotes around the path as follows:
"C:\Program Files (x86)\Windows Media Player\wmplayer.exe" arg1 arg2
If I use Text.Split(new Char[] { ' ' }, 2); then I get the first space.
How to get the path and args ?
...
Hey,
I am processing my website and wanting to change some things on the pages.
I am wanting to replace the following string:
in the
<SPAN class="Bold">
More...
</SPAN>
column to your right.
Some times is does not have the <span> tags :
in the
More...
column to your right.
I would like to replace this with "below". I tried doing...
I know strings are immutable, so the minute you change a string reference's value .NET makes a brand new string on the heap.
But what if you don't change the value of a string reference; rather, you simply pass it into a function ByVal -- does this operation copy the string value on the heap as well? My inclination is "no," but I'd l...
What is the fastest way to compare a string with an array of strings in C#2.0
...
I'm having problems with a DataTable line, the idea is that I want to pull out of a series of rows any rows where one of the column values is in a set of guids. However, I'm getting a guid / string comparison error from the select() function.
The code is as follows:
Dim sb As New StringBuilder
For Each Row As DataRow In dtData.Rows
...
One of Googles Let's make the internet faster talks included something about using echo with multiple arguments in PHP instead of using print or string concatenation.
echo 'The ball is ', $color;
Rather than either of these
echo "The ball is $color";
echo 'The ball is ' . $color;
What if output buffering is in play ?
What would be...
How do I convert the string:
"Microsoft Windows XP Professional x64 Edition|C:\\WINDOWS|\\Device\\Harddisk4\\Partition1"
to
"Microsoft Windows XP Professional x64 Edition"
...using regular expressions?
I want to cut out all after | symbol. Is it easy to realise it via Regex.Replace? Where could I found syntax description for Rege...
Hello. I made a small function to catenate strings and return the combined string. However since I assign memory to a third variable in the function, will the memory be freed when the function finishes or will it stay there, requiring me to free it later? and if I need to free it, what's the most stylish solution to do it?
Here's the te...
I have followed Apple's documentation on localizing iPhone software, using the genstrings ruby script to create my strings file, and have localized all of my nib files. I also looked on both Apple's message boards, and around the net to try to find the solution.
I have made sure that all strings files are UTF-16, and changed my build s...
Hi all,
I have a table called Basic , start_time is one field with type :VARCHAR(5), which actually stores a 5 bytes time data: byte 0 and 1 map to the year , month and day, and byte 2 to 4 map to the hour, min and second. So, it could possible bytes 2 ,3 ,4 are all 0. And I want to do following query :
Basic.find (:all , :conditions =...
I have the following string: \\\?\hid#vid_04d8pid_003f#62edf110800000#{4d1e55b2-f16f-11cf-88cb-001111000030} stored in a string variable (from a function call) called devPathName
and the following defined: const string myDevice = @"vid_04d8pid_003f";
but the following code always evaluates to false:
Boolean test = true;
test = devPa...
I need help.
How come this does not work:
NSProcessInfo *process = [NSProcessInfo processInfo];
NSString *processName = [process processName];
int processId = [process processIdentifier];
NSString *processString = [NSString stringWithFormat:@"Process Name: @% Process ID: %f", processName, processId];
NSLog(processString);
But this doe...
I'm investigating encodings in PHP5. Is there some way to get a raw hex dump of a string? i.e. a hex representation of each of the bytes (not characters) in a string?
...
I know lstrcpy is used for string copy for both unicode and ascii,
But I can not use lstrncpy, because I can't find the head file.
What is the name of the head file, I googled it, and find someone is using it.
Many thanks!
...
Weird - I think what I want to do is a fairly common task but I've found no reference on the web. I have text, with punctuation, and I want an array of the words. i.e - "Hey, you - what are you doing here!?" should be ['hey', 'you', 'what', 'are', 'you', 'doing', 'here']. But python's split() only works with one argument... so I have all...
I have been looking at LLVM lately, and I find it to be quite an interesting architecture. However, looking through the tutorial and the reference material, I can't see any examples of how I might implement a string data type. There is a lot of documentation about integers, reals, and other number types, and even arrays, functions and ...
Hi,
I've tried many functions already, but i simply can't figure it out. The right way anyway.
in a form field called description, i can expect all kinds of characters. These need to be formatted into html entities before submitted to the db.
Now, my code:
$formdesc = htmlentities($_POST['formdesc'], ENT_QUOTES);
and for mysql quer...
I've noticed a lot of little debates about when to use regex and when to use a built in string function like String.Replace() (.NET).
It seems a lot of people recommend always, always, always using regex whenever you deal with strings at all (besides just displaying them). Is this really best practice or just a wrong impression on my p...
For example I have a column that contains string (in English - "A", "B" ) "AB1234" and I'd like to compare it to the string "AB1234" (in Russian "A", "B" ), for Example.
Is there any built-in function to achieve this?
The best way I found is to use Translate func where i enumerate all needed symbols.
...
I have code like this:
define(`DOSPACE',`...................................
.........................
................`'ifelse(eval(len(`Space: $2: $3')>60),1,`...'substr($3,eval((60-len(`Space: $2: $3')-7)*-1),$3)
...................
...................')
That is, if the total string is too long (over 60 chars), I want to strip off ...