Class Index | File Index

Classes


Class KJUR.lang.String


Version 1.0 (2016-Aug-05).
String and its utility class
Defined in: base64x-1.1.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
String and its utility class
This class provides some static utility methods for string.
Method Summary
Method Attributes Method Name and Description
<static>  
KJUR.lang.String.isBase64(s)
check whether a string is a base64 encoded string or not
Input string can conclude new lines or space characters.
<static>  
KJUR.lang.String.isBase64URL(s)
check whether a string is a base64url encoded string or not
Input string can conclude new lines or space characters.
<static>  
KJUR.lang.String.isHex(s)
check whether a string is an hexadecimal string or not
<static>  
KJUR.lang.String.isInteger(s)
check whether a string is an integer string or not
<static>  
KJUR.lang.String.isIntegerArray(s)
check whether a string is a string of integer array or not
Input string can conclude new lines or space characters.
Class Detail
KJUR.lang.String()
String and its utility class
This class provides some static utility methods for string.
This class provides static methods for string utility.
STRING TYPE CHECKERS

Author: Kenji Urushima.
Since:
base64x 1.1.7 jsrsasign 5.0.13
Method Detail
<static> {Boolean} KJUR.lang.String.isBase64(s)
check whether a string is a base64 encoded string or not
Input string can conclude new lines or space characters.
KJUR.lang.String.isBase64("YWE=") → true
KJUR.lang.String.isBase64("YW_=") → false
KJUR.lang.String.isBase64("YWE") → false -- length shall be multiples of 4
Parameters:
{String} s
input string
Since:
base64x 1.1.7 jsrsasign 5.0.13
Returns:
{Boolean} true if a string "s" is a base64 encoded string otherwise false

<static> {Boolean} KJUR.lang.String.isBase64URL(s)
check whether a string is a base64url encoded string or not
Input string can conclude new lines or space characters.
KJUR.lang.String.isBase64URL("YWE") → true
KJUR.lang.String.isBase64URL("YW-") → true
KJUR.lang.String.isBase64URL("YW+") → false
Parameters:
{String} s
input string
Since:
base64x 1.1.7 jsrsasign 5.0.13
Returns:
{Boolean} true if a string "s" is a base64url encoded string otherwise false

<static> {Boolean} KJUR.lang.String.isHex(s)
check whether a string is an hexadecimal string or not
KJUR.lang.String.isHex("1234") → true
KJUR.lang.String.isHex("12ab") → true
KJUR.lang.String.isHex("12AB") → true
KJUR.lang.String.isHex("12ZY") → false
KJUR.lang.String.isHex("121") → false -- odd length
Parameters:
{String} s
input string
Since:
base64x 1.1.7 jsrsasign 5.0.13
Returns:
{Boolean} true if a string "s" is an hexadecimal string otherwise false

<static> {Boolean} KJUR.lang.String.isInteger(s)
check whether a string is an integer string or not
KJUR.lang.String.isInteger("12345") → true
KJUR.lang.String.isInteger("123ab") → false
Parameters:
{String} s
input string
Since:
base64x 1.1.7 jsrsasign 5.0.13
Returns:
{Boolean} true if a string "s" is an integer string otherwise false

<static> {Boolean} KJUR.lang.String.isIntegerArray(s)
check whether a string is a string of integer array or not
Input string can conclude new lines or space characters.
KJUR.lang.String.isIntegerArray("[1,2,3]") → true
KJUR.lang.String.isIntegerArray("  [1, 2, 3  ] ") → true
KJUR.lang.String.isIntegerArray("[a,2]") → false
Parameters:
{String} s
input string
Since:
base64x 1.1.7 jsrsasign 5.0.13
Returns:
{Boolean} true if a string "s" is a string of integer array otherwise false

© 2012-2017 Kenji Urushima, All rights reserved
Documentation generated by JsDoc Toolkit 2.4.0