What's a relatively fast way of checking if a string is decrypted English? I asked this on Stack Overflow but I was told to ask here.

I'm writing a program that decrypts text encrypted using a Vigenere cipher. It's been working very well so far, but my current issue is that I need an effective way of checking if a string is decrypted. So far, I've been checking how many times the string contains a set of the most common English words, but that doesn't work if the string has no spaces.

For example, the following "plaintext":

XPAWWALLTPJZYYZWBGSHGARECPVHDAAPLJLBGAPVTFVCWAS


contains "all", "are", "was", and "as", but it is clearly not decrypted.

What's a good way of checking if a string is decrypted?
Searching purley for substrings in a string would be a programming question but since Stackoverflow already sent you here I will give it a try:

Java:

public class MyClass
{
    public static void main(String[] args)
    {
        String myString = "XPAWWALLTPJZYYZWBGSHGARECPVHDAAPLJLBGAPVTFVCWAS";

        int intIndex = myString.indexOf("ARE");

        if(intIndex == - 1)
        {
            System.out.println("ARE was not found");
        }
        else
        {
            System.out.println("Found ARE at index "+ intIndex);
        }
    }
}


C#:

using System;

public class MyClass
{
   public static void Main()
   {
      string myString = "XPAWWALLTPJZYYZWBGSHGARECPVHDAAPLJLBGAPVTFVCWAS";

      if (myString.Contains("ARE") == true)
      {
         Console.WriteLine("Found ARE");
      }
      else
      {
         Console.WriteLine("Word ARE was not found!");
      }
   }
}


These should both work.

You can then create a loop that searches the string for common words.