Complete a string base on index of last character

Example Word : String , the returned last index is 5 which is "g". I need to complete the word string base on the space before the word.

For example

obj string the last index is 5, which is g, "string" word should be completed.

Answers


If you are using C#, you can use String.LastIndexOf method to report the last occurrence of ' ' character then use String.Substring to extract the word.

For other languages, Google is your friend :)


Need Your Help

Send Formatted messages through Twilio

twilio twilio-click-to-call

I want to know that how I can send formated messages through twilio .net api

How to compare a NUMBER with VARCHAR2 type number having leading zeroes?

sql oracle numbers type-conversion varchar

I am trying to compare two columns in two different tables in a database. One column is of type VARCHAR2(4 CHAR) and the other is of type DECIMAL. Although I am pulling these columns into JAVA as a