Hi ,
I have a generic list of string:
List listOfString = new List();
I then add 4 strings to this list:
listOfString .Add("test1");
listOfString .Add("test2");
listOfString .Add("test3");
listOfString .Add("test4");
I want to check check a string variable if it contains any element within my string a...
i'm using GetStringUTFChars to retrieve a string's value from the java code using JNI and releasing the string using ReleaseStringUTFChars. When the code is run on JRE 1.4 then there is no memory leak but if the same code is run with a JRE 1.5 and higher version then the memory increases. This is a part of the code:
msg_id=(*env)->GetS...
I would like to pass multiple parameters from the iphone sdk to a server-side php which interfaces with a mySQL database.
i found some answers on how to do this, but i'm having a hard time figuring out how to include several parameters.
what i have right now is
- (IBAction)sendButtonPressed:(id)sender
{
NSString *urlstr = [[NSSt...
Buffer overrun problems are well known. Thus we were blessed with standard library functions such as wcscat_s(). And the kind folks at Microsoft have created similar safe string functions such as as StringCbCat().
But I have a problem where I need to search a bit of memory for a string. The Standard library function:
wcsstr( wchar_t* ...
How do I convert a CString to a double in C++?
Unicode support would be nice also.
Thanks!
...
I'm pretty new at this, and this is probably a pretty obvious answer. In my csv script, i'm trying to figure out how to read a csv file using the CSVReader class and write to a new csv file. The error is telling me writeNext(java.lang.String[]) cannot be applied to (java.lang.String). I've tried using a direct assignment and getString...
I have a table that stores user information. The table has a userid (identity) column in it. The table data is queried by a view which is referenced by a lot of sprocs, but we reference something called auid which is created by the UDF below. The UDF is called in the view and sprocs then join or query from the view based on auid. It ...
Hi there ;-)
I've written a small function in C, which almost do the same work as standart function `fcvt'. As you may know, this function takes a float/double and make a string, representing this number in ANSI characters. Everything works ;-)
For example, for number 1.33334, my function gives me string: "133334" and set up special in...
hi,
I am working in a application that takes unicode string as a input. I successfully obtained the sets of words as a list. Now i need to search the input string in the given sets of string that are in the list. I tried to compare the given string with each string in the list but only gets the unrecognised characters as an output. I thi...
I come from a php background and in php, there is an array_size() function which tells you how many elements in the array are used. Is there a similar method for a String[] array?
thanks
...
I am trying to convert a string like "testing123" into hexadecimal form in java. I am currently using BlueJ.
And to convert it back, is it the same thing except backward?
...
Using just C
I would like to parse a string and
a) count the occurrences of a character in a string
(so i.e. count all the e's in a passed in string)
b) Once counted (or even as I am counting) replace the e's with 3's
Thanks.
...
Is there a perceptable difference between using String.Format and string concatenation in Java?
I tend to use String.format but occasionally will slip and use a concat, I was wondering if one was better than the other.
The way I see it String.Format gives you more power in "formatting" the string and concatenation means you don't have ...
I have a Unicode string consisting of letters, digits and punctuation marks. Ho can I detect characters that are digits and letters (not necessarily ASCII) with a C++ standard library or Win32 API?
...
I am a C++ beginner, so sorry if the question is too basic.
I have tried to collect the string constrcturs and try all them out (to remember them).
string strA(); // string(); empty string // incorrect
string strB("Hello"); // string( const char* str)
string strC("Hello",3); // string( const char* str, size_type length)
stri...
I'm working on a site that pulls various public RSS feeds down. I want to show a HTMLless, short description of the feed entry.
Some of the feeds come with a nice excerpt but lots don't so I'm left making my own from the full-content.
So what is the best/quickest/easiest way to take a block of text and slice it down to just the first ...
I have the following code snippet where some strings are initialized in the if block:
String serialmask = request.getParameter( "serialmask");
String serialincrement = request.getParameter( "serialincrement");
if (serialmask == "1") {
String tserialmask = "aaa########";
}
else {
String tserialmask = "";
}
if (serialincrement ==...
Hey all. Is there a way to copy only a portion of a single (or better yet, a two) dimensional list of strings into a new temporary list of strings?
...
Hi there. I'm writing an app that revolves around getting sets of numerical data from a file. However, since the data is acquired in string form, I have to convert it to floats, which is where the fun starts. The relevant section of my code is as shown (lines 65-73):
ft = []
puts "File Name: #{ARGV[0]}"
File.open(ARGV[0], "r...
My goal is to echo the argument passed to a function. For example, how can this be done?
$contact_name = 'foo';
function do_something($some_argument){
// echo 'contact_name' .... How???
}
do_something($contact_name);
...