MCPcopy Create free account
hub / github.com/GCWing/BitFun / is_ipv4

Function is_ipv4

src/apps/desktop/src/api/remote_connect_api.rs:393–395  ·  view source on GitHub ↗

Quick check whether a string looks like an IPv4 address.

(s: &str)

Source from the content-addressed store, hash-verified

391
392/// Quick check whether a string looks like an IPv4 address.
393fn is_ipv4(s: &str) -> bool {
394 s.split('.').count() == 4 && s.split('.').all(|p| p.parse::<u8>().is_ok())
395}
396
397#[tauri::command]
398pub async fn remote_connect_get_device_info() -> Result<DeviceInfo, String> {

Callers 1

Calls 2

allMethod · 0.80
countMethod · 0.45

Tested by

no test coverage detected