Pchp.Core.PhpString.ChunkLength C# (CSharp) Method

ChunkLength() static private method

static private ChunkLength ( object chunk ) : int
chunk object
return int
        static int ChunkLength(object chunk)
        {
            AssertChunkObject(chunk);

            if (chunk.GetType() == typeof(string)) return ((string)chunk).Length;
            if (chunk.GetType() == typeof(byte[])) return ((byte[])chunk).Length;
            if (chunk.GetType() == typeof(PhpString)) return ((PhpString)chunk).Length;
            if (chunk.GetType() == typeof(char[])) return ((char[])chunk).Length;
            throw new ArgumentException();
        }

Same methods

PhpString::ChunkLength ( object chunks, int count ) : int