Re: ascii length??

From: EricJ (ericReMoVe_at_ThiSbitconsult.be.RE)
Date: 02/23/04


Date: Mon, 23 Feb 2004 09:08:44 +0100

just a thought haven't tried this
did you try to convert the string to a char array and take the length of
that (if the double-byte chars count as 2 ascii chars that might work)

hope it helps

eric

"Algren" <cookieless18@yahoo.com.NO_SPAM> wrote in message
news:e0J6zKe%23DHA.4084@tk2msftngp13.phx.gbl...
> hi all,
>
> I am wondering how I can get the ascii lengh of a string in VB.NET?
> Especially that the string consists of alpha numerics as well as chinese
> (double-byte) characters. Say I have a string "¢Ï¢Ð123" with the first 2
> characters being double-byte, using Len() on that string would return me
5.
> How can I get a value of 7 instead?? is there any VB.NET function that'd
> achieve that?
>
> Thanks a lot and your help's greatly appreciated.
>
>



Relevant Pages

  • Re: [Emacs] Kommentieren
    ... ;; completely up to the user to decide, what the string ... "Chars preserved of STRING. ... `CHARS-PRESERVE' must be a parentized expression, ...
    (de.comp.editoren)
  • Re: FASTEST way to try all strings (a until ZZZZZZZZZZZZZZZZZZZZZZZZ)
    ... > It will be a very huge table so I in my opinion. ... > When it would be used, than it should be converted to a string, however ... >> How would an array of Byte be any faster then an array of Char? ... >> array of Byte is needed, however the OP suggested Chars (A to Z, a to z ...
    (microsoft.public.dotnet.general)
  • Re:(9corr) string
    ... and I want to remove the month in the timestamp for each of the string ... Then advance 4 chars, and copy from +2 to the current pointer until you ... pointer past the year part to reach the month part. ... this guarantee is 'memmove'. ...
    (comp.lang.c)
  • Re: FASTEST way to try all strings (a until ZZZZZZZZZZZZZZZZZZZZZZZZ)
    ... > It will be a very huge table so I in my opinion. ... > When it would be used, than it should be converted to a string, however ... >> How would an array of Byte be any faster then an array of Char? ... >> array of Byte is needed, however the OP suggested Chars (A to Z, a to z ...
    (microsoft.public.dotnet.languages.vb)
  • Re: speed question
    ... chars of column A and first 2 of column B. ... as it is a string contatenation. ... > I want to have smart search like iTunes or something like that. ... > Dzemal Tipura (Dzemo) - MCP ...
    (microsoft.public.dotnet.framework.adonet)