diff --git a/crates/automation/src/workspace.rs b/crates/automation/src/workspace.rs index 99dedac77d..3954095d45 100644 --- a/crates/automation/src/workspace.rs +++ b/crates/automation/src/workspace.rs @@ -374,8 +374,11 @@ fn preferences_may_grant_ambient_paths(id: &str, params: &Value) -> bool { fn preference_uses_ambient_filesystem(path: &str) -> bool { // The engine skips empty segments (`.scriptEvents.enabled` sets `scriptEvents.enabled`), so // judge the first non-empty one; no segment at all is the whole-preferences update. - let Some(section) = path.split('.').find(|segment| !segment.is_empty()) else { return true }; + let mut segments = path.split('.').filter(|segment| !segment.is_empty()); + let Some(section) = segments.next() else { return true }; + // File Handling's LUT folder (#6558) is listed from disk; the rest of that section is not. matches!(section, "colorSettings" | "scriptEvents" | "historyLog" | "plugIns" | "scratchDisks") + || (section == "fileHandling" && segments.next().is_none_or(|key| key == "lutFolder")) } fn command_uses_ambient_path(id: &str, params: &Value) -> bool { @@ -847,6 +850,8 @@ mod tests { "historyLog.filePath", ".historyLog.filePath", "plugIns.additionalPluginsFolder", + "fileHandling.lutFolder", + "fileHandling", "scratchDisks.disks", ".", "..historyLog.filePath", @@ -857,6 +862,7 @@ mod tests { authorize_engine_command("prefs.set", &serde_json::json!({"values": {"interface.language": "fr", "historyLog.filePath": "/outside/log"}})).is_err() ); assert!(authorize_engine_command("prefs.set", &serde_json::json!({"path": "interface.language", "value": "fr"})).is_ok()); + assert!(authorize_engine_command("prefs.set", &serde_json::json!({"path": "fileHandling.autosave", "value": false})).is_ok()); } #[test] diff --git a/crates/engine/src/adjust_cmds.rs b/crates/engine/src/adjust_cmds.rs index 7e3b05b44c..accafb2bc5 100644 --- a/crates/engine/src/adjust_cmds.rs +++ b/crates/engine/src/adjust_cmds.rs @@ -168,6 +168,36 @@ fn base_name(path: &str) -> String { path.rsplit(['/', '\\']).next().unwrap_or(path).to_string() } +/// Most LUT files [`folder_luts`] lists. +const MAX_FOLDER_LUTS: usize = 500; + +/// The `.cube`, `.3dl` and `.look` files directly in `dir`, as (file name, path) sorted by name, +/// for Color Lookup's dropdown (Preferences › File Handling › LUT Folder, #6558). An empty, +/// missing or unreadable folder lists nothing; hidden files and subfolders are skipped. +#[cfg(not(target_arch = "wasm32"))] +pub fn folder_luts(dir: &str) -> Vec<(String, String)> { + let dir = dir.trim(); + let Some(entries) = (!dir.is_empty()).then(|| std::fs::read_dir(dir).ok()).flatten() else { return Vec::new() }; + let mut out: Vec<(String, String)> = entries + .flatten() + .filter_map(|e| { + let name = e.file_name().into_string().ok()?; + let ext = name.rsplit_once('.')?.1.to_ascii_lowercase(); + let path = e.path(); + (!name.starts_with('.') && matches!(ext.as_str(), "cube" | "3dl" | "look") && path.is_file()).then_some((name, path.to_str()?.to_string())) + }) + .collect(); + out.sort_by_key(|(name, _)| name.to_lowercase()); + out.truncate(MAX_FOLDER_LUTS); + out +} + +/// No file system on the web: a LUT folder lists nothing there. +#[cfg(target_arch = "wasm32")] +pub fn folder_luts(_: &str) -> Vec<(String, String)> { + Vec::new() +} + #[cfg(not(target_arch = "wasm32"))] fn read_file(path: &str) -> Option> { std::fs::read(path).ok() diff --git a/crates/engine/src/adjust_cmds/tests.rs b/crates/engine/src/adjust_cmds/tests.rs index 1dc0c88656..0d95266049 100644 --- a/crates/engine/src/adjust_cmds/tests.rs +++ b/crates/engine/src/adjust_cmds/tests.rs @@ -731,3 +731,17 @@ fn invert_turns_the_black_of_quick_mask_and_alpha_channels_white() { } } } + +/// #6558: a LUT folder lists its LUT files by name, case-insensitively, and nothing else. +#[test] +fn folder_luts_lists_lut_files_by_name() { + let dir = tempfile::tempdir().unwrap(); + for f in ["b.cube", "A.3DL", "c.look", "notes.txt", ".hidden.cube", "noext"] { + std::fs::write(dir.path().join(f), "LUT_3D_SIZE 2\n").unwrap(); + } + std::fs::create_dir(dir.path().join("sub.cube")).unwrap(); + let names: Vec<_> = folder_luts(dir.path().to_str().unwrap()).into_iter().map(|(name, _)| name).collect(); + assert_eq!(names, ["A.3DL", "b.cube", "c.look"]); + assert!(folder_luts("").is_empty()); + assert!(folder_luts(dir.path().join("missing").to_str().unwrap()).is_empty()); +} diff --git a/crates/engine/src/prefs.rs b/crates/engine/src/prefs.rs index ed8b7f148f..b82db268c8 100644 --- a/crates/engine/src/prefs.rs +++ b/crates/engine/src/prefs.rs @@ -463,6 +463,9 @@ pub struct FileHandling { pub recent_file_count: u32, /// Most recently opened files, newest first (File › Open Recent). pub recent_files: Vec, + /// A folder whose `.cube`, `.3dl` and `.look` files Color Lookup lists under its built-in + /// looks (native only, #6558). Empty lists none. + pub lut_folder: String, } impl Default for FileHandling { @@ -481,6 +484,7 @@ impl Default for FileHandling { rasterize_svg_groups_deeper_than: photocraft_doc::MAX_GROUP_DEPTH as u32, recent_file_count: 20, recent_files: Vec::new(), + lut_folder: String::new(), } } } diff --git a/crates/ui-egui/src/adjust_ui.rs b/crates/ui-egui/src/adjust_ui.rs index b713e9104e..2492da68f6 100644 --- a/crates/ui-egui/src/adjust_ui.rs +++ b/crates/ui-egui/src/adjust_ui.rs @@ -90,14 +90,55 @@ fn browse_color_lookup(app: &mut PhotocraftApp, layer: LayerId) -> Result Vec<(String, String)> { + type Cached = (String, f64, Vec<(String, String)>); + let folder = app.session.prefs().file_handling.lut_folder.clone(); + let now = ctx.input(|input| input.time); + let key = egui::Id::new("color-lookup-folder"); + if let Some((cached, at, luts)) = ctx.data(|data| data.get_temp::(key)) + && cached == folder + && now - at < 2.0 + { + return luts; + } + let luts = photocraft_engine::adjust_cmds::folder_luts(&folder); + ctx.data_mut(|data| data.insert_temp::(key, (folder, now, luts.clone()))); + luts +} + +/// The dropdown key for the current look: a built-in id, a LUT folder file, `none` or `custom`. +fn current_lookup(name: &str, has_lut: bool, folder: &[(String, String)]) -> String { + if !has_lut { + return "none".into(); + } + if let Some((id, _)) = photocraft_engine::adjust_cmds::LOOKS.iter().find(|b| b.1 == name) { + return id.to_string(); + } + folder.iter().find(|(file, _)| file == name).map_or_else(|| "custom".into(), |(_, path)| format!("{FOLDER_LUT}{path}")) +} + +/// `layer.setAdjustment` params for a dropdown key: a folder file is read and embedded like +/// Load 3D LUT… does; anything else is a built-in id or `none`. +fn lookup_params(key: &str) -> Value { + match key.strip_prefix(FOLDER_LUT) { + Some(path) => json!({"file": path}), + None => json!({"lut": key}), + } +} + pub fn color_lookup_editor(app: &mut PhotocraftApp, ui: &mut egui::Ui, id: LayerId, adj: &Adjustment) { let t = Tokens::get(ui.ctx()); let Adjustment::ColorLookup { name, lut, size, tetrahedral, dither } = adj else { return; }; let builtins = photocraft_engine::adjust_cmds::LOOKS; - let current = - if lut.is_none() { "none".to_string() } else { builtins.iter().find(|b| b.1 == name).map_or_else(|| "custom".to_string(), |b| b.0.to_string()) }; + let folder = folder_luts(app, ui.ctx()); + let current = current_lookup(name, lut.is_some(), &folder); let current = app .live_adjust .as_ref() @@ -108,6 +149,7 @@ pub fn color_lookup_editor(app: &mut PhotocraftApp, ui: &mut egui::Ui, id: Layer let custom_label = format!("{name} ({size}³)"); let mut opts: Vec<(String, &str)> = vec![("load".into(), tl!("Load 3D LUT…")), ("none".into(), tl!("None"))]; opts.extend(builtins.iter().map(|(id, label)| (id.to_string(), *label))); + opts.extend(folder.iter().map(|(file, path)| (format!("{FOLDER_LUT}{path}"), file.as_str()))); if current == "custom" { opts.push(("custom".into(), custom_label.as_str())); } @@ -127,14 +169,16 @@ pub fn color_lookup_editor(app: &mut PhotocraftApp, ui: &mut egui::Ui, id: Layer let (chosen, _) = widgets::dropdown_wheel_hovered(ui, &format!("clrl-{}", id.0), &mut sel, &opts, 170.0); if !chosen.is_empty() { if cycle_input { - if sel != "load" && sel != "custom" { + // ponytail: wheel previews cover the built-ins only; a folder LUT would be re-read + // from disk on every step. Pick it with a click. + if sel != "load" && sel != "custom" && !sel.starts_with(FOLDER_LUT) { app.live_adjust = Some((id, json!({"lut": sel}))); cycling_preview = true; } } else if sel == "load" { browse = true; } else if sel != current && sel != "custom" { - params = Some(json!({"lut": sel})); + params = Some(lookup_params(&sel)); } } }); @@ -219,6 +263,35 @@ mod lookup_picker_tests { ); } + /// #6558: a LUT folder file is offered by name, and picking it embeds it. + #[test] + fn lut_folder_files_are_offered_and_embedded() { + let dir = std::env::temp_dir().join(format!("pc-lut-folder-{}", std::process::id())); + std::fs::create_dir_all(&dir).unwrap(); + let path = dir.join("film.cube"); + std::fs::write(&path, CUBE).unwrap(); + let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default()); + app.run("prefs.set", json!({"path": "fileHandling.lutFolder", "value": dir.to_str().unwrap()})).unwrap(); + let folder = folder_luts(&app, &egui::Context::default()); + let key = format!("{FOLDER_LUT}{}", path.to_str().unwrap()); + assert_eq!(folder, [("film.cube".to_string(), path.to_str().unwrap().to_string())]); + app.run("file.new", json!({"width": 16, "height": 12})).unwrap(); + let layer = app.run("layer.newAdjustmentLayer.colorLookup", json!({})).unwrap()["layer"].as_u64().unwrap(); + let mut p = lookup_params(&key); + p["layer"] = json!(layer); + app.run("layer.setAdjustment", p).unwrap(); + let photocraft_doc::LayerContent::Adjustment(Adjustment::ColorLookup { name, lut, .. }) = + &app.session.active().unwrap().doc.layer(LayerId(layer)).unwrap().content + else { + panic!("not a Color Lookup layer") + }; + assert!(lut.is_some()); + assert_eq!(current_lookup(name, true, &folder), key); + assert_eq!(current_lookup(name, true, &[]), "custom"); + assert_eq!(lookup_params("none"), json!({"lut": "none"})); + let _ = std::fs::remove_dir_all(&dir); + } + #[test] fn invalid_lut_does_not_modify_the_existing_adjustment() { let (dialog, _) = file_dialog::fake(vec![Some(FileDialogAnswer::Contents("broken.cube".into(), b"invalid".to_vec()))]); diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 15879f60d2..54a8a10aba 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -2007,6 +2007,7 @@ Quick export format Formát rychlého exportu Quick export location Umístění rychlého exportu Recent file count Počet nedávných souborů + LUT folder Složka LUT Recent files Nedávné soubory Recent fonts Nedávná písma Recover on launch Obnovit při spuštění diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index eb3ca77944..832500b352 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -1981,6 +1981,7 @@ Quick export format Schnellexport-Format Quick export location Schnellexport-Ziel Recent file count Anzahl zuletzt geöffneter Dateien + LUT folder LUT-Ordner Recent files Zuletzt geöffnete Dateien Recent fonts Zuletzt verwendete Schriften Recover on launch Beim Start wiederherstellen diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index bac53b53d6..e47b49562c 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -2897,6 +2897,7 @@ Raw Data Ακατέργαστα δεδομένα Raw Defaults Προεπιλογές RAW Recent file count Αριθμός πρόσφατων αρχείων + LUT folder Φάκελος LUT Recent files Πρόσφατα αρχεία Recent fonts Πρόσφατες γραμματοσειρές Reconstruct Ανακατασκευή diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 8629fc3fda..f7a30b3578 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -1995,6 +1995,7 @@ Quick export format Formato de exportación rápida Quick export location Ubicación de exportación rápida Recent file count Número de archivos recientes + LUT folder Carpeta de LUT Recent files Archivos recientes Recent fonts Fuentes recientes Recover on launch Recuperar al iniciar diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index fad669a4b2..c1abdf8aa4 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -1964,6 +1964,7 @@ Quick export format Format d'exportation rapide Quick export location Emplacement d'exportation rapide Recent file count Nombre de fichiers récents + LUT folder Dossier LUT Recent files Fichiers récents Recent fonts Polices récentes Recover on launch Récupérer au démarrage diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index c066f42711..7405aef684 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -3476,6 +3476,7 @@ cameraRaw Yellow Sárga Random Véletlenszerű Rasterize svg groups deeper than SVG-csoportok raszterizálása ennél mélyebb szinten Recent file count Legutóbbi fájlok száma + LUT folder LUT-mappa Recent files Legutóbbi fájlok Recent Files Legutóbbi fájlok Recent fonts Legutóbbi betűtípusok diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 9e0012bd64..733e2b7b89 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -1958,6 +1958,7 @@ Quick export format Format ekspor cepat Quick export location Lokasi ekspor cepat Recent file count Jumlah berkas terbaru + LUT folder Folder LUT Recent files Berkas terbaru Recent fonts Font terbaru Recover on launch Pulihkan saat dibuka diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index fe8d4cf8dd..b1858ec837 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -1989,6 +1989,7 @@ Quick export format Formato esportazione rapida Quick export location Posizione esportazione rapida Recent file count Conteggio file recenti + LUT folder Cartella LUT Recent files File recenti Recent fonts Font recenti Recover on launch Recupera all'avvio diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 9b121c4c90..9b8cdf95d1 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -1991,6 +1991,7 @@ Quick export format クイック書き出しの形式 Quick export location クイック書き出しの保存先 Recent file count 最近使ったファイルの数 + LUT folder LUT フォルダー Recent files 最近使ったファイル Recent fonts 最近使ったフォント Recover on launch 起動時に復元 diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index dc4bf58c95..8c27cad055 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -1959,6 +1959,7 @@ Quick export format 빠른 내보내기 형식 Quick export location 빠른 내보내기 위치 Recent file count 최근 파일 수 + LUT folder LUT 폴더 Recent files 최근 파일 Recent fonts 최근 글꼴 Recover on launch 시작 시 복구 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 7104d69eda..d1e29b52e6 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -1963,6 +1963,7 @@ Quick export format Formaat snel exporteren Quick export location Locatie snel exporteren Recent file count Aantal recente bestanden + LUT folder LUT-map Recent files Recente bestanden Recent fonts Recente lettertypen Recover on launch Herstellen bij opstarten diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 8abed62baa..064f2a0ee6 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -1984,6 +1984,7 @@ Quick export format Format szybkiego eksportu Quick export location Lokalizacja szybkiego eksportu Recent file count Liczba ostatnich plików + LUT folder Folder LUT Recent files Ostatnie pliki Recent fonts Ostatnie czcionki Recover on launch Odzyskaj przy uruchomieniu diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index b21564e683..ac3e7ab64d 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -1958,6 +1958,7 @@ Quick export format Formato da exportação rápida Quick export location Local da exportação rápida Recent file count Número de arquivos recentes + LUT folder Pasta de LUTs Recent files Arquivos recentes Recent fonts Fontes recentes Recover on launch Recuperar ao iniciar diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index ff6fc08de8..d85f984f15 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -2419,6 +2419,7 @@ Quick export format Формат быстрого экспорта Quick export location Расположение быстрого экспорта Recent file count Число недавних файлов + LUT folder Папка LUT Recent files Недавние файлы Recent fonts Недавние шрифты Recover on launch Восстановление при запуске diff --git a/crates/ui-egui/src/i18n/sr.tsv b/crates/ui-egui/src/i18n/sr.tsv index 9a1ceff635..f4ddd13161 100644 --- a/crates/ui-egui/src/i18n/sr.tsv +++ b/crates/ui-egui/src/i18n/sr.tsv @@ -1942,6 +1942,7 @@ Quick export format Format brzog izvoza Quick export location Lokacija brzog izvoza Recent file count Broj nedavnih datoteka + LUT folder Fascikla LUT Recent files Nedavne datoteke Recent fonts Nedavni fontovi Recover on launch Oporavi pri pokretanju diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index def688abcd..b01127d9fe 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -1939,6 +1939,7 @@ Quick export format Hızlı dışa aktarma formatı Quick export location Hızlı dışa aktarma konumu Recent file count Son dosya sayısı + LUT folder LUT klasörü Recent files Son dosyalar Recent fonts En yeni yazı tipleri Recover on launch Başlatıldığında kurtar diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index e28ea0008c..9570ff5a21 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -2391,6 +2391,7 @@ Quick export format Формат швидкого експорту Quick export location Розташування швидкого експорту Recent file count Кількість нещодавніх файлів + LUT folder Папка LUT Recent files Нещодавні файли Recent fonts Нещодавні шрифти Recover on launch Відновлювати під час запуску diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 503cc1006f..017fe17d70 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -1502,6 +1502,7 @@ cameraRaw Shadows Vùng tối Quick export format Định dạng xuất nhanh Quick export location Vị trí xuất nhanh Recent file count Số tệp gần đây + LUT folder Thư mục LUT Recent files Tệp gần đây Recover on launch Khôi phục khi khởi chạy Remember workspace changes Ghi nhớ thay đổi không gian làm việc diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index a030a8885f..fa5516b210 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -2007,6 +2007,7 @@ Quick export format 快速导出格式 Quick export location 快速导出位置 Recent file count 最近使用的文件数量 + LUT folder LUT 文件夹 Recent files 最近使用的文件 Recent fonts 最近使用的字体 Recover on launch 启动时恢复 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 25a05a1826..d6d50d6027 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -2000,6 +2000,7 @@ Quick export format 快速匯出格式 Quick export location 快速匯出位置 Recent file count 最近檔案數量 + LUT folder LUT 資料夾 Recent files 最近檔案 Recent fonts 最近使用的字體 Recover on launch 啟動時復原 diff --git a/crates/ui-egui/src/prefs_ui.rs b/crates/ui-egui/src/prefs_ui.rs index 5cd2e547d8..79674da4ec 100644 --- a/crates/ui-egui/src/prefs_ui.rs +++ b/crates/ui-egui/src/prefs_ui.rs @@ -1175,7 +1175,13 @@ fn humanize(key: &str) -> String { s.push(ch); } } - s.replace("Psd", "PSD").replace("Gpu", "GPU").replace("Ui ", "UI ").replace("Mb", "(MB)").replace("Exif", "EXIF").replace("Hud", "HUD") + s.replace("Psd", "PSD") + .replace("Gpu", "GPU") + .replace("Ui ", "UI ") + .replace("Mb", "(MB)") + .replace("Exif", "EXIF") + .replace("Hud", "HUD") + .replace("Lut ", "LUT ") } fn choice_label(v: &str) -> String {