Horje
Smooth Sentences c# Code Example
Smooth Sentences c#
public static bool IsSmooth(string sentence)
{
    sentence = sentence.Trim().ToLower();
    string[] sentences = sentence.Split(' ');

    if (sentence.Length <= 1) return false;

    for (int i = 0; i < sentences.Length - 1; i++)
    {
        string previousWord = sentences[i];
        char lastChar = Char.Parse(previousWord.Substring(previousWord.Length - 1));

        string followingWord = sentences[i + 1];
        char firstChar = Char.Parse(followingWord.Substring(0, 1));

        if (lastChar != firstChar) return false;
    }

    return true;
}




Csharp

Related
HMD Motion Emulation Code Example HMD Motion Emulation Code Example
check that IEnumerable is not empty Code Example check that IEnumerable is not empty Code Example
.net new template Code Example .net new template Code Example
enable asnotracking in asp.net core at global level Code Example enable asnotracking in asp.net core at global level Code Example
//Unity rigidbody drag and top speed relation: Code Example //Unity rigidbody drag and top speed relation: Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9