CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Dec 2009
    Posts
    23

    Convert a String to an array of single characters?

    Hi everyone!

    (I am using MS' Visual C# 2008 Express, in case that makes any difference...)

    What I want to do is this: Take the content of a string (e.g. "Hello") and 'convert' it to an array that stores each character seperately (e.g. { "H", "e", "l", "l", "o" }). Can somebody tell me how to do that?

    Additionally, is there a function that returns the index of an entity within an array? That is, if I was searching for an "e" in { "H", "e", "l", "l", "o" }, it'd return 1.

    Sorry if these questions are dumb but I find it hard to come up with good key words for a google search. :/

    Thanks in advance! (:
    Last edited by TryingToC#; December 13th, 2009 at 02:30 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured