openstranded-common-helpers 0.1.0

OpenStranded shared helper functions for .inf field parsing
Documentation
# openstranded-common-helpers

Shared helper functions for parsing `.inf` file fields across all
OpenStranded domain type crates.

Part of the [OpenStranded](https://github.com/OpenStranded) project.
Published on [crates.io](https://crates.io/crates/openstranded-common-helpers).

## Functions

| Function | Returns | Description |
|----------|---------|-------------|
| `first_str` | `Option<&str>` | Get first value of a field as `&str` |
| `first_string` | `Option<String>` | Get first value as owned `String` |
| `first_u32` | `Option<u32>` | Get first value parsed as `u32` |
| `first_f32` | `Option<f32>` | Get first value parsed as `f32` |
| `parse_color` | `Option<[u8; 3]>` | Parse `"R,G,B"` colour string |
| `parse_optional_u32` | `Option<Option<u32>>` | Parse field that may be `"none"` or a number |

## Usage

```toml
[dependencies]
openstranded-common-helpers = "0.1"
```

```rust
use std::collections::HashMap;
use openstranded_common_helpers::{first_str, first_u32};

let mut fields = HashMap::new();
fields.insert("id".into(), vec!["42".into()]);
assert_eq!(first_u32(&fields, "id"), Some(42));
```

## Background

These functions were originally duplicated across all 6 `openstranded-common-*`
domain crates. They operate on the `HashMap<String, Vec<String>>` structure
produced by the `inf2ron` parser, extracting the first value of a named field.

## Dependencies

Only `serde` — this is a pure utility crate with no engine dependencies.

## License

GPL-3.0-or-later