1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added RSAKey::isValid() and URL::isEmpty()

This commit is contained in:
jules 2014-09-11 09:45:26 -07:00
parent aae0690b7c
commit eed0a41a4f
4 changed files with 18 additions and 1 deletions

View file

@ -179,6 +179,11 @@ String URL::toString (const bool includeGetParameters) const
return url;
}
bool URL::isEmpty() const noexcept
{
return url.isEmpty();
}
bool URL::isWellFormed() const
{
//xxx TODO

View file

@ -76,6 +76,9 @@ public:
*/
String toString (bool includeGetParameters) const;
/** Returns true if the URL is an empty string. */
bool isEmpty() const noexcept;
/** True if it seems to be valid. */
bool isWellFormed() const;

View file

@ -54,6 +54,11 @@ bool RSAKey::operator!= (const RSAKey& other) const noexcept
return ! operator== (other);
}
bool RSAKey::isValid() const noexcept
{
return operator!= (RSAKey());
}
String RSAKey::toString() const
{
return part1.toString (16) + "," + part2.toString (16);

View file

@ -113,11 +113,15 @@ public:
//==============================================================================
/** Turns the key into a string representation.
This can be reloaded using the constructor that takes a string.
*/
String toString() const;
/** Returns true if the object is a valid key, or false if it was created by
the default constructor.
*/
bool isValid() const noexcept;
//==============================================================================
/** Encodes or decodes a value.