![ContractedBlock.gif](/Images/OutliningIndicators/ContractedBlock.gif)
![ExpandedBlockStart.gif](/Images/OutliningIndicators/ExpandedBlockStart.gif)
using System;
using System.Security.Cryptography;
using System.Text;
using System.IO;
namespace Common
{
/**//// <summary>
/// 算法:将str1中的str2都去掉,假设得到str3;str1-str3则得到的str4应该是str2的倍数,
/// </summary>
public sealed class DESEncrypt
{
public static void Main(String[] args)
{
string str1 = "Request Request Request Request Request RequestRequest";
string str2="Request Request";
Console.WriteLine(str1.Length);
Console.WriteLine(str1.Replace(str2, "").Length);
Console.WriteLine(str2.Length);
int count = (str1.Length - str1.Replace(str2, "").Length) / str2.Length;
Console.WriteLine(count);
Console.ReadLine();
}
}
}