src/openSourceC.DotNetLibrary.Core/Extensions/StringExtensions.cs
/// <summary>
///		Encodes all characters in the specified string into a UTF8 encoded sequence of bytes.
/// </summary>
/// <param name="obj">The string.</param>
/// <returns></returns>
Encodes all characters in the specified string into a UTF8 encoded sequence of bytes.
Encodes all characters in the specified string into a UTF8 encoded sequence of bytes .
[return: NotNullIfNotNull("obj")]
		public static byte[]? GetUTF8Bytes(this string? obj)
		{
			if (obj == null)
			{
				return null;
			}
			return Encoding.UTF8.GetBytes(obj);
		}
[ return : NotNullIfNotNull ( " " ) ] public static byte [ ] ? GetUTF8Bytes ( this string ? obj ) { if ( obj == null ) { return null ; } return Encoding . UTF8 . GetBytes ( obj ) ; }
Encodes all characters in the specified string into a UTF8 encoded sequence of bytes.
Encodes all characters in the specified string into a UTF8 encoded sequence of bytes .
None
string?
this
obj
None