MimeKit.Header.WordBreak C# (CSharp) 메소드

WordBreak() 정적인 개인적인 메소드

static private WordBreak ( MimeKit.FormatOptions format, string word, int lineLength ) : IEnumerable
format MimeKit.FormatOptions
word string
lineLength int
리턴 IEnumerable
		static IEnumerable<BrokenWord> WordBreak (FormatOptions format, string word, int lineLength)
		{
			var chars = word.ToCharArray ();
			int startIndex = 0;

			lineLength = Math.Max (lineLength, 1);

			while (startIndex < word.Length) {
				int length = Math.Min (format.MaxLineLength - lineLength, word.Length - startIndex);

				if (char.IsSurrogatePair (word, startIndex + length - 1))
					length--;

				yield return new BrokenWord (chars, startIndex, length);

				startIndex += length;
				lineLength = 1;
			}

			yield break;
		}