Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
6
Question by Santa · May 15, 2010 at 03:44 PM · stringconvert

How to convert string to uppercase or lowercase?

Hello,

How to convert string to uppercase or lowercase?

I've tried String.toUpperCase() but it's not supported.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
21
Best Answer

Answer by Larry-Dietz · May 15, 2010 at 03:48 PM

use String.ToUpper()

EDIT: String.ToLower() for lower case

-Larry

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Santa · May 15, 2010 at 04:28 PM 0
Share

Thanks a lot :) By the way could you tell where to get documentation with this (and hope more :) functions?

avatar image Larry-Dietz · May 15, 2010 at 05:41 PM 1
Share

This I just know from program$$anonymous$$g in C# and VB.net for so long. So I just tried it real quick in a Javascript in Unity to make sure it would work :)

avatar image Eric5h5 · May 15, 2010 at 07:52 PM 1
Share

@Santa: http://msdn.microsoft.com/en-us/library/system.string_members(VS.80).aspx

avatar image KalteWasser29 · Jul 23, 2012 at 02:56 AM 1
Share

Is there a way to convert the first letter of a string to an upper case? Like if I have some inputs, and want to convert them to lower case first, so I can check the strings for the command inputs, and if none, just return the first letter to capital?

avatar image AlucardJay · Jul 23, 2012 at 03:04 AM 0
Share

Read the first letter with : myString.Substring(0, 1)

avatar image
-1

Answer by Slarti-42 · Oct 14, 2021 at 04:24 PM

String.ToUpper() doesn't work:

textField = textField.ToUpper(); textField = textField.ToLower();

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Junaid-Rehman · Oct 15, 2021 at 02:27 PM

// convert string to uppercase const upperStr = str.toUpperCase(); // convert string to lowercase const lowerStr = str.toLowerCase();,// convert string to uppercase const upperStr = str.toUpperCase();

// convert string to lowercase const lowerStr = str.toLowerCase(); Try This.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Getting variable name from a string 1 Answer

Converting String to a Game Object 1 Answer

PlayerPrefs Question 0 Answers

TextField Query 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges