StringToLongInteger() public static method

Converts a string to long integer using conversion algorithm in a manner of PHP.
public static StringToLongInteger ( string str ) : long
str string The string to convert.
return long
Exemplo n.º 1
0
 public override long ToLong(ref PhpValue me) => Convert.StringToLongInteger(me.String);
Exemplo n.º 2
0
 public long ToLong()
 {
     return(Convert.StringToLongInteger(ToString()));
 }
Exemplo n.º 3
0
            /// <summary>
            /// Sets value at specific index. Value must not be an alias.
            /// </summary>
            void IPhpArray.SetItemValue(IntStringKey key, PhpValue value)
            {
                int index = key.IsInteger ? key.Integer : (int)Convert.StringToLongInteger(key.String);

                this[index] = value;
            }
Exemplo n.º 4
0
 public long ToLong() => Convert.StringToLongInteger(ToString());
Exemplo n.º 5
0
            /// <summary>
            /// Gets value at given index.
            /// Gets <c>void</c> value in case the key is not found.
            /// </summary>
            PhpValue IPhpArray.GetItemValue(IntStringKey key)
            {
                int index = key.IsInteger ? key.Integer : (int)Convert.StringToLongInteger(key.String);

                return((index >= 0 && index < this.Length) ? this[index].AsValue() : PhpValue.Create(string.Empty));
            }