StringToLongInteger() 공개 정적인 메소드

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.
리턴 long
예제 #1
0
 public override long ToLong(ref PhpValue me) => Convert.StringToLongInteger(me.String);
예제 #2
0
 public long ToLong()
 {
     return(Convert.StringToLongInteger(ToString()));
 }
예제 #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;
            }
예제 #4
0
 public long ToLong() => Convert.StringToLongInteger(ToString());
예제 #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));
            }