Conversion of string to upper case without inbuilt methods

前端 未结 7 1838
轻奢々
轻奢々 2021-01-29 08:28

I am trying to perform conversion from a lowercase to uppercase on a string without using any inbuilt functions (other than ord() and char()). Following the logic presented on a

7条回答
  •  Happy的楠姐
    2021-01-29 08:46

    ord()- Return the Unicode code point for a one-character string.

    You have to send a one character string as an argument. Here, you are sending the string 'abcd' which has 4 characters which is causing the issue. Send each character separately to the function and thus do 4 calls to the function to get the result.

提交回复
热议问题