How do I convert a char string to a wchar_t string?
I have a string in char* format and would like to convert it to wchar_t*, to pass to a Windows function. ...
I have a string in char* format and would like to convert it to wchar_t*, to pass to a Windows function. ...
Hi I'm currently calling a web service from my J2ME app and receiving the xml document as a string object. is it possible to convert the string object to a document type? Can I navigate the document inside the string? Any answers would be appreciated, been googling for a while and so far, no good. ...
I'd like to get a string, for example 'sdasdasdsdkjsdkdjbskdbvksdbfksjdbfkdbfksdjbf' and split that up every six charaters. I don't think explode or strtok will work for that? Any ideas? ...
I'm trying to make my code be able to separate a file into a customer database (it's delimited by many spaces and not tabs). I try to use strtok, but I get an EXC_BAD_ACCESS error. Here is my main.cpp code: #include <iostream> #include <fstream> #include <string> #include <sstream> #include "Cust.h" using namespace std; int main (int a...
In my attempt at dissecting a bit of C# I am afraid I do not understand either the goal or the logic of this bit of code: if (!string.IsNullOrEmpty(str2) && (Strings.UCase(Strings.Left(str2, 1)) != Strings.Left(str2, 1))) { return false; } I understand the first part is checking if str2 is "not null", however the secon...
Hi all, I want to do a search of a list of strings, non cap sensitive. Have tried .Contains and == Is there a method to do this, or would I have to convert the entire list of strings to noncaps, then search? Cheers! ...
How do you check a string if there is a special character like: [,],{,},{,),*,|,:,>,etc.? ...
Hi! Do you know any easy way to remove (or replace) all non alphanumeric characters from varchar variable in Mysql? something like String's replaceAll("[^a-zA-Z0-9]", "I") in Java ('I' is my special character but "" would be also good ) ...
I am loading / inserting data into oracle table , in case of special characters like chinese language characters, i am getting an error like row rejected because maximum size of column was exceeded, i am not getting this error for rows which have english characters which appear to be of same length for same column. I am using SUBSTR and ...
Sorry if that question has no answer.. What is the easiest and non-verbose way to make all the strings in C# application trimmed by default? Creating new Type, or extension method, or Attribute? Are there any hacks or settings to decrease number of Trim() calls? UPD. Well, I have no particular case - just a lot of user input from UI or ...
public class MatrixMultiply{ public static void main(String[] args) { main(); } static void main() { int[] vec = { 1, 2, 3, 4, 5 }; System.out.println( mean( vec ) ); } static int mean(int[] v) { int total = 0; for (int i = 0 ; i < v.length ; i++ ) { total = tot...
I'm used to Java's String where we can pass null rather than "" for special meanings, such as use a default value. In Go, string is a primitive type, so I cannot pass nil (null) to a parameter that requires a string. I could write the function using pointer type, like this: func f(s *string) so caller can call that function either a...
how would you write te date if i have a date and all i want is the month and the day like this (mm/dd) and then turn the month like this July, 08 ...
Hi all, preemptive sorry for the newbie question. I'm trying to load strings from a resource file in an iPhone project (XCode, Objective C++). I've created a file called s.strings with the following content: /* s.strings Created by Seva on 11/22/09. */ "a"="b" The file is in UTF-16, it's in the Resources folder in the project,...
I have a struct which contains a member called char *text. After I've created an object from the struct, then how do I set text to a string? ...
I want to rewrite everything that uses this pattern... /test/?TEXT=TRUE and allow it to be /test/TEXT AND /test/TEXT2, and so on. ...
I did check the other questions; this question has its focus on solving this particular question the most efficient way. Sometimes you want to create a new string with a specified length, and with a default character filling the entire string. ie, it would be cool if you could do new String(10, '*') and create a new String from there,...
Possible Duplicate: What is the purpose of the expression new String() in Java? It's immutable, why would you need to invoke String.String(String str) ? ...
I have an ArrayList and wish to be able to call an index and use the returned string for a method call. e.g. stringList.get(2)(); Is there any way I could go about this? ...
I am trying to use a messagebox to debug a Visual C# program. When I click a button I want a simple messagebox to popup and display the values of several integer variables. This is what I have System.Windows.Forms.MessageBox.Show(myGame.P2.Money); However the variable Money is an integer, and so I get this error: Argument '1': cann...