| 687 | // return true on success. |
| 688 | |
| 689 | bool ParseNameValuePair(std::string& name, |
| 690 | std::string& value, |
| 691 | const std::string& input) |
| 692 | { |
| 693 | // split string into name=value. |
| 694 | size_t pos = input.find('='); |
| 695 | if (pos==std::string::npos) |
| 696 | { |
| 697 | return false; |
| 698 | } |
| 699 | |
| 700 | name = input.substr(0,pos); |
| 701 | value = input.substr(pos+1); |
| 702 | return true; |
| 703 | } |
| 704 | |
| 705 | // return true on success. |
| 706 | bool StringToFloat(float * fval, const char * str) |