string-length

Calculate the display width of a string in Java

How to calculate the length (in pixels) of a string in Java? Preferable without using Swing. EDIT: I would like to draw the string using the drawString() in Java2D and use the length for word wrapping. ...

What is the string length of a Guid?

I want to create a varchar folumn in SQL should contain N'guid' while guid is a generated Guid by .net (Guid.NewGuid). What is the length of the varchar I should expect from a Guid? is it a static length? Should I use nvarchar (will Guid ever use unicode chars)? varchar(Guid.Length) PS. I don't want to use SQL row guid data-type, jus...

String length and jQuery

How do you get the length of a string in jQuery? ...

Problem setting a computed-column

I am trying to set this col but I get an error: FirstName + (CASE WHEN LEN(FirstName + LastName) > 0 THEN ' ' ELSE '') + LastName ...

Is mb_strlen a suitable replacement for iconv_strlen

That is, if I'm coding something entirely in PHP4? Or perhaps I should use a custom function or class/extension instead to count the number of characters in a multibyte string? Only difference I can spot is that mb_string strips out bad sequences, while iconv_strlen doesn't. ...

PHP: whats the total length of a post global variable?

Hi, I was wondering if anybody knows the total length that a post global could be. e.g: $_POST['formInput'] = "hello world, how long can i be?"; I am creating a site where someone will enter an unknown amount of chars into a textarea, so potentially it could be 2 pages on a word document. So if anybody knows of any other methods of h...

Does Java's toLowerCase() preserve original string length?

Assume two Java String objects String str = "<my string>"; String strLower = str.toLowerCase(); Is it then true that for every value of <my string> str.length() == strLower.length() evaluates to true? So, does String.toLowerCase() preserve original string length for any value of String? ...

strlen() function

I have read that use of strlen is more expensive than such testing like this: We have a string x 100 characters long. I think that for (int i = 0; i < strlen(x); i++) is more expensive than this code: for (int i = 0; x[i] != '\0'; i++) Is it true? Maybe the second code will not work in some situation so is it better to use the fi...

Display only 10 characters of a long string?

How do I get a long text string (like a querystring) to display a maximum of 10 characters, using JQuery? Sorry guys I'm a novice at JavaScript & JQuery :S Any help would be greatly appreciated. ...

PHP shortest/longest string in array

I have an array like this $data = array( "163", "630", "43", "924", "4", "54" ); How can I select the smallest and largest values from it according to string length NOT number value. (for this example it is 1 (smallest) and 3 (largest). ...

How to count string length of a domain list and group them by length?

I have a list of domain names, for example: domain1.com domain2.com domainxxx2.com dom.com from that list I want to get: length 7 [2] length 10 [1] length 3 [1] I know how to split the tld and count each domain length, but dont know how to group and count those with the same length. I would like to do it on PHP. ...

How can I display a string which excess 254 chars in Crystal Reports 8.5?

hi How can I display a string which excess 254 chars in my report created by crystal reports 8.5? My application that shows the report ia a vb6.0 application. Thank you ...