mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 13:49:18 +01:00
fix how missing values are handled in dictionaries
This commit is contained in:
@@ -246,6 +246,14 @@ public class StringDict {
|
||||
return values[index];
|
||||
}
|
||||
|
||||
|
||||
public String get(String key, String alternate) {
|
||||
int index = index(key);
|
||||
if (index == -1) return alternate;
|
||||
return values[index];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @webref stringdict:method
|
||||
* @brief Create a new key/value pair or change the value of one
|
||||
|
||||
Reference in New Issue
Block a user