Answers for "how to get first letter and last letter of string"

2

java get first char

char fourth = "Banana".charAt(3);
Posted by: Guest on May-14-2020
0

Get the First and Last Word from a String or Sentence

DECLARE @Sentence    VARCHAR(MAX) = 'The quick brown fox jumps over the lazy dog'

SELECT SUBSTRING(@Sentence, 1, CHARINDEX(' ', @Sentence) - 1) AS [First Word],
       REVERSE(SUBSTRING(REVERSE(@Sentence), 1,                CHARINDEX(' ', REVERSE(@Sentence)) - 1)) AS [Last Word]
Posted by: Guest on April-30-2021

Code answers related to "how to get first letter and last letter of string"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language