Created
May 10, 2012 03:04
-
-
Save pinzolo/2650763 to your computer and use it in GitHub Desktop.
文字列拡張
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace MktSys.Lib.Extensions | |
{ | |
/// <summary> | |
/// String クラス拡張メソッド定義クラス | |
/// </summary> | |
public static class StringExtension | |
{ | |
/// <summary> | |
/// 文字列が空(null含む)かどうかを判別するメソッドを追加する。 | |
/// </summary> | |
/// <param name="text">文字列</param> | |
/// <returns>文字列が null か空文字の場合 true を、それ以外の場合 false</returns> | |
public static bool IsEmpty(this String text) | |
{ | |
if (text == null) | |
{ | |
return true; | |
} | |
return text.Length == 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment