pg_str/src/modules/substr.rs

14 lines
269 B
Rust

use pgrx::prelude::*;
#[pg_extern]
pub fn str_substr(input: &str, start: i32, end: i32) -> &str {
&input[start as usize..end as usize]
}
#[cfg(any(test, feature = "pg_test"))]
mod tests {
#[allow(unused_imports)]
use super::*;
use pgrx::prelude::*;
}