Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Strings and things

Discussion in 'Scripting' started by Mr. Animator, Feb 3, 2006.

  1. Mr. Animator

    Mr. Animator

    Joined:
    Oct 2, 2005
    Posts:
    193
    There must be a way but I can't find anything in the documentation... how do you extract specific characters or words from a string? Say you have a variable with the string "Hello" stored in it... how could you then print the 2nd through 5th characters?("ello")

    (( braces for the inevitable obvious solution ))
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
  3. Mr. Animator

    Mr. Animator

    Joined:
    Oct 2, 2005
    Posts:
    193
    Thanks, as you can see there are some holes in my non-unity-specific scripting knowledge. :)