Re: Equivalent of String.fromCharCode() method in C#

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 08/19/04


Date: Thu, 19 Aug 2004 14:51:35 -0400

Bob,

    I would create an array of characters with those values. Once you do
that you can pass the character array to the constructor of the string class
and it will give you a string.

    Hope this helps.

-- 
               - Nicholas Paldino [.NET/C# MVP]
               - mvp@spam.guard.caspershouse.com
"Bob" <anonymous@discussions.microsoft.com> wrote in message 
news:93ff01c48619$38b5f610$a401280a@phx.gbl...
> In Jscript, fromCharCode returns a string from a number of
> Unicode character values.
> In the following example, test contains the string "plain":
>
> var test = String.fromCharCode(112, 108, 97, 105, 110);
>
> Does anyone know the equivalent of this method in J#?
>
> To understand the JScrip example, save the following as a
> html file and open that file
>
> <html>
> <head>
> <script language="jscript">
>
> function test() {
>
> alert(String.fromCharCode(112, 108, 97, 105, 110));
>
> }
> </script>
>
> <body onload="test()">
>
> <p id=writebefore>
> </P>
>
> </body>
> </html>
>
>
> Thanks,
> Bob 


Relevant Pages

  • Re: Substring
    ... Which is unfortunate because the null string will be holding on to a character array it doesn't need. ... As suggested in 2001 and 2005 Sun bug reports regarding this very behaviour of substring(...), if the implementation of substringdoes not change it would be helpful if the Javadoc for the method points out this behaviour. ...
    (comp.lang.java.programmer)
  • read bytes from file
    ... NextExecuteTime As Date ... ProcScheduler As String * 1 ... offsets and lengths contained in the TextOffset array. ... into a character array, but I have to define the character array size before ...
    (comp.lang.java.programmer)
  • Re: select specific capture device by name
    ... > I beleive that var.bstrval has the string that I need, ... IVC_BOARD_NAME is not a BSTR. ... and points to a Unicode character array. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: How to match string for cell array strmatch() in Matlab
    ... Requires character array or cell array of strings as inputs. ... then I need to parse the textscan results using the strmatch but met ... If you just want to know if there is an 'a' but don't care where in the string it is, ...
    (comp.soft-sys.matlab)
  • Re: going through a string / char array and putting the bits in other variables
    ... > string or character array, and then reads through the string and takes ... > more varialbes and stuff but Im tryin to do it myself I just don't know ... > just functions to do this sort of thing, ...
    (comp.lang.cpp)