I need to do the following C# code in C++ (if possible). I have to const a long string with lots of freaking quotes and other stuff in it.
const String _literal = @"I can use "quotes" inside here";
i asked a question regarding how to display aspx and cs code on page,
one answer was convert to string and display in textbox
i would like to know if there is a function in c# asp.net which allows to convert file contents directly to string?
Hi All
I'm trying to extract/match data from a string using regular expression but I don't seem to get it.
I wan't to extract the highlighted characters from the following string:
/xubuntu/daily/current/lucid-alternate-**i386**.iso
This should also work in case of:
/xubuntu/daily/current/lucid-alternate-**amd64**.iso
Thanks a lot for your help.
Hi there,
I tried to pass a string value into a JavaScript function like below:
<%= "'" + prop.property_description + "'") %>)
But it does not seems to be the best option, is there a better way to do the above without concatenate the string values with "'"?
Thanks
For example in C#
@-quoted string literals start with @ and are enclosed in double quotation marks...
So Is there anething like @-quoted string in Actionscript?
I must do a automatic codes generator with user-configurable string with predefined keys and can not find a good way to do it.
For example, a string
OT-{CustomCode}-{Date}-{##}
could generate codes
OT-C0001-20100420-01
OT-C0001-20100420-02
I thought of using RegExpr.Replace(), but I would have problems if the code of a customer was {##}
Any help is welcome! (and sorry for my english)
Is there a way to turn a char into a String or a String with one letter into a char (like how you can turn an int into a double and a double into an int)? (please link to the relevant documentation if you can).
How do I go about finding something like this that I'm only vaguely aware of in the documentation?
I'm writing a program in C++ that reads in some data from an external file in order to set the values of static variables.
Is it possible to convert a string to an object identifier? (e.g. convert the string "CheckBox::Unchecked" into and identifier for the object CheckBox::unchecked)
In my last question i asked how to best send a string from one view controller to another, both which were on a navigation stack:
http://stackoverflow.com/questions/2898860/pass-string-from-tableviewcontroller-to-viewcontroller-in-navigation-stack
However I just realised I can either pass the path to the file in the app's document's folder as the first (the table view) has already accessed the data in the file should I pass viewcontroller the data to the pushed VC?
Hello
is there are better way to structure this line of code, as you can see, I am changing the format of a string that contains a date.
lblCourseStartDate.Text = String.Format("{0:D}", DateTime.Parse(CourseStartDate));
I just found it untidy that I am converting twice or three times to get the format I want.
Thanks
How in Java can I get list of all characters appearing in string, with number of their appearances ? Let's say we have a string "I am really busy right now" so I should get :
i-2, a-2, r-2, m-1 and so on.
Wondering if anyone knows if either of these methods would produce an output faster:
Method 1
for ($i=1;$i<99999;$i++) {
echo $i, '<br>';
}
or
Method 2
for ($i=1;$i<99999;$i++) {
$string .= $i . '<br>';
}
echo $string;
Thanks for any input you have.
Hi folks,
Real quick question - what's the cleanest way of editing the characters in a string in C#?
i.e. what is cleanest C# equivalent of c++:
std::string myString = "boom";
myString[0] = "d";
Hi,
I hope this question isn't too basic.
I have a string "-123445". Is it possible to remove the '-' character from the string?
I have tried the following but to no avail:
$mylabel.text("-123456");
$mylabel.text().replace('-', '');
Any help would be greatly appreciated.
Thanks,
Zaps
Hi, im just writing my own replace method for any weird characters and i used the ASCI value 0, null to replace unwanted characters, i was hoping for them to be 'deleted', but this doesnt work. A gap just appears in the string.
What exactly does String.Replace() do when removing a character for ""? Does it shift them all down and then 'delete' the final character or something?
What's the cleanest way of editing the characters in a string in C#?
What's the C# equivalent of this in C++:
std::string myString = "boom";
myString[0] = "d";
Hi,
I have a string in PHP for example $string = "Blabla [word]";
I would like to filter the word between the '[' brackets.
The result should be like this $substring = "word";
thanks
Suppose I want to use the ASCII special character FS(0x1C) in a .Net string, and then be able to format a byte array from that same string with the special character properly represented as a single byte, how would I do that? I can't seem to get my head around it.
Thanks for any help you can give.
I want to copy a string into a char array, and not overrun the buffer.
So if I have a char array of size 5, then I want to copy a maximum of 5 bytes from a string into it.
what's the code to do that?
In javascript I am used to just being able to pick any character from a string like "exm[2]" and it would return to me the third character in a string. In C is there a way to do that or something without a function that requires a buffer?
HI,
I want to split a string into each single character. Eg:
Splitting : "Geeta" to "G", "e", "e" , "t", "a"
How can I do this? I want to split a string which don't have any separator
Please help.
Hi,
I guess it has to do something with string being a reference type but I dont get why simply string.Replace("X","Y") does not work?
Why I need to do `string A=stringB.Replace("X","Y")
I thought it is just a method to be done on specified instance? Thanks for explanation
EDIT: Thank you so far. I extend my question Why "b+="FFF"works but the b.replace is not?
This is my BIG string
BEGIN:VEVENT
UID:xxxxxx
DTSTAMP:xxxxxx
STATUS:CONFIRMED
CLASS:PUBLIC
URL:xxxxxx
SUMMARY:YYYYYYY
DESCRIPTION:xxxxxx; YYYYYYY;
DTSTART:xxxxxx
DTEND:xxxxxx
GEO:xxxxxx
LOCATION:xxxxxx
END:VEVENT
I need to change position of the two "YYYYYYY" in SUMMARY/DESCRIPTION
I have to replace them without being specific since it is implemented in a much larger function. (This string is already sliced out of a 3700 line - Calendar)
pls help! :)