Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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. :)