string

javascript string manipulation

I have a long string with Headers and Sub-headers. Every header is supposed to have a sub header, but the string pre-processing, does not. I need to manipulate it in such a way that every header has a Sub-header. Every header that does not have a string has a reference point under different header. The header missing the subheader need...

'__glibcxx_requires_valid_range' was not declared in this scope (xcode)

I'm trying to use in an Xcode (iphone) static library, and can't figure out this error. Anyone else had this before? It borks in the file stl_algobase.h at these places: __glibcxx_requires_valid_range(__first, __last); I've tried using GCC 4.0, but it always includes from here: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs...

Can I Eliminate Extra Unicode String Calls (Delphi)

I'm using Delphi 2009. In my program, I have been working very hard to optimize all my Delphi code for speed and memory use, especially my Unicode string handling. I have the following statement: Result := Result + GetFirstLastName(IndiID, 1); When I debug that line, upon return from the GetFirstLastName function, it traces into ...

C++ simple string replace, non complicated code, but producing crazy error

First, thank for you all your help! The error I am getting is: Unhandled exception at 0x7c812afb (kernel32.dll) in Readerboard.exe: Microsoft C++ exception: std::out_of_range at memory location 0x0012f8a8.. I have found the problem to be with this line: str.replace(str.find(sought), sought.size(), replacement); It is lo...

What is the most efficient way of checking to see if an array of strings has any duplicates in .NET

I have a very, very large unsorted string array and i need to check to see if there are duplicates. What is the most efficient method of checking this? ...

SQL Converting string MMM.YY to date

Hi, how do i convert/cast a column contains strings e.g. Jan.08,Feb.08.. into date format so that i can sort them? Greatest Thanks! ...

how to initialize List<string> with many string values

have your say your idea or correct the example below please. List<string> optionList = new List<string> { "AdditionalCardPersonAdressType","AdditionalCardPersonSex","AutomaticRaiseCreditLimit","CardDeliveryTimeWeekDay","CardDeliveryTimeWeekEnd","CCAdditionalCardAddress", "CCAdditionalCardPerson","CCAutoPaidType","CCSendAddressType","CCS...

C# in VS2005: what is the best way to check if a string is empty?

What is the best way to check if a string is empty in C# in VS2005? ...

Produce a String that contains alphabetic symbols only, (52 for English, 60 for German etc)

is there a library that can return strings like that Lib.Alpha.FOR_LATIN = 'abcd...zABCD..XYZ' Lib.Alpha.FOR_GERMAN = 'aäbcd..oö..uü...' etc? ...

Simple C++ Writing to File: Nothing Gets Written! Should be easy, but I'm stumpted.

Thank you so much for helping me! Everyone is so fast and excellent! Thanks again! What is happening is no data is being written to my file, after I test this code. Just a 0 appears. What am I doing wrong? void CreateHtmlFile(string myMessages[]) { int i = 0; int emptyarray = 0; int myEmptyCounter = 0; int emptyArrayCounter = ...

How do I return an array of strings from a recursive function?

How do I return an array of strings from a recursive function? For example:: char ** jumble( char *jumbStr)//reccurring function { char *finalJumble[100]; ...code goes here...call jumble again..code goes here return finalJumble; } Thanks in advance. ...

vb.net string of nulls

I have a string value read in from a CSV file. The CSV file contains 7 NULL bytes, I have confirmed this by opening it in a hex editor and sure enought there are 7 0x0 bytes in there. This string is causing me pain. In vb.net when I check the strlen of this string it returns a value of 7 and if i do a String.IsNullOrWhitespace it return...

Returning character string of unknown length in fortran

Apologies for the rather simple question, I just can't seem to find ANY good fortran docs. I'm trying to write a function that reads from a unit, trims the output and appends the null terminator, something like: character(*) function readCString() character*512 str read(1, *) str readCString = TRIM(str)//char(0) return end func...

Split a paragraph into lines in ZSH

How can I take a multi-line string in zsh, and split it into an array of strings that are a single line each? Specifically I want to take the output of cal June 2010 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 and turn it into (" June 2010 "...

Help Parsing a string in PHP

I will have a string like this: Bob is a boy. Bob is 1000 years old! <b>Bob loves you!</b> Do you love bob? I want to parse it into an array, using the following delimiters to identify each array element: . ! ? <b> and </b> So I will have an array with the following structure: [0]Bob is a boy. [1]Bob is 1000 years old! [2]Bob love...

How to represent Unicode Chr Code in VB.Net String literal?

I know you can put unicode character codes in a VB.Net string like this: str = Chr(&H0030) & "More text" I would like to know how I can put the char code right into the string literal so I can use unicode symbols from the designer view. Is this even possible? ...

Remove first and last instance of a string?

How can I remove the first instance of a certain piece of html from a string. I'm looking to remove </tr> </table></td> </tr which is near the begining, but it also appears throughout the string. I also need a way to do the same thing but the last instance of it. Anyone know? ...

Problem with type-casting array of strings in C

I am trying to read a large list of English words from a text file to array of strings. The number of words is 2016415, and maximum length of a word is 69 characters. If I define array like "char data[2016415][70]; " then I get stack overflow when I run the program. So I am trying to use calloc() instead, however I can't understand how...

PHP: Very simple Encode/Decode string

Is there any PHP function that encodes a string to a int value, which later I can decode it back to a string without any key? ...

Is there any need to set a member string variable of a class to ""?

Is there any need to set a string member variable of a class to ""? Will it be null unless you do this? ...